Output
Used memory from active, wired, and compressed physical pages. The default item displays a memorychip icon and text such as RAM 8 GB. Omitting the memory block behaves the same as memory: {}.
Example
{
"id": "memory",
"type": "memory",
"text": "{{#available}}{{used}} / {{total}}{{/available}}{{^available}}—{{/available}}"
}
This shows an icon and a value such as 8 GB / 16 GB. Set top-level text: "" for an icon-only item, or showSymbol: false for text-only output.
Configuration
Use the item-level text template to customise or hide the label. The provider options below control its data, symbols, colours, and visibility.
All fields below are inside memory.
| Property | Default | Description |
|---|---|---|
showSymbol | true | Show the state icon, including an item-level override. |
symbols.font | - | Shared installed font name for glyph symbols; each glyph can override it. |
symbols.size | Resolved item/theme font size | Shared glyph size, 8 to 72 points; each glyph can override it. |
symbols.available | memorychip | Valid memory reading. |
symbols.unavailable | questionmark | No usable memory reading. |
Display formats
| Template fields | Example value | Meaning |
|---|---|---|
{{used}} | 8 GB | Used bytes formatted by macOS. |
{{percentage}}% | 50% | Used bytes divided by installed physical RAM, rounded to the nearest whole percent. |
{{used}} / {{total}} | 8 GB / 16 GB | Used bytes and installed physical RAM, each formatted by macOS. |
Write the RAM prefix in text when wanted. Wrap readings in an available section to handle missing values.
Symbols and accessibility
Symbols accept SF Symbol names or font glyph objects. Use symbolFontWeight to set SF Symbol weight independently of text.
An item-level symbol overrides both state icons; showSymbol: false hides it regardless. Icon-only items retain used/total and percentage in their accessibility label, or Memory usage unavailable when no valid reading exists.
To change memory, edit the configuration file. sbar set cannot change this block.
Shared item options cover styling, symbols, actions, priority, and enabled state.
Text templates
The item-level text setting supports id, value, symbol, used, total, percentage, usedBytes, totalBytes, available. See text templates for syntax and field meanings. Formatted sizes include units. usedBytes and totalBytes contain raw byte counts; percentage has no percent sign.
Updates
The provider samples memory usage every two seconds for all displays. Startup, failed reads, or inconsistent counts display RAM — with the unavailable icon by default, replacing the previous reading. The next valid sample restores the value.
Refresh policies capture the full numeric state, including unavailable readings. Manual and interval items retain their snapshot until refreshed. Raw provider events retain used-byte formatting regardless of an item’s display mode. See refresh policies.
Current limits
Used bytes are active + wired + compressed physical pages, multiplied by the host page size. This specific VM-counter measure does not include every VM category and is not necessarily equivalent to Activity Monitor’s “Memory Used”. All these fields use the same calculation.
No memory-pressure measurement, configurable units, alternative usage calculation, or dedicated state tints.