Output
Aggregate busy CPU usage across all cores, from 0% to 100%, rounded to the nearest whole percent. The default item displays a cpu icon and CPU N%. Omitting the cpu block behaves the same as cpu: {}.
Example
{
"id": "cpu",
"type": "cpu",
"cpu": {
"smoothingSamples": 3,
"warningThreshold": 60,
"highThreshold": 85,
"tints": {
"medium": "#EBCB8B",
"high": "#BF616A",
"unavailable": "#888888"
}
},
"text": "{{#available}}{{percentage}}%{{/available}}{{^available}}—{{/available}}"
}
This shows an icon and N%, averaging up to three recent samples. 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 cpu.
| Property | Default | Description |
|---|---|---|
showSymbol | true | Show the state icon, including an item-level override. |
smoothingSamples | 1 | Integer 1 to 30; average this many recent available samples before rounding. |
warningThreshold | 60 | Integer 0 to 100; medium usage starts at this displayed percentage. Must be below highThreshold. |
highThreshold | 85 | Integer 0 to 100; high usage starts at this displayed percentage. |
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.low | cpu | Below the warning threshold. |
symbols.medium | cpu | At or above warning, below high. |
symbols.high | cpu | At or above the high threshold. |
symbols.unavailable | questionmark | No usable CPU sample. |
tints.low | Normal tint | Low-usage colour. |
tints.medium | Normal tint | Medium-usage colour. |
tints.high | Normal tint | High-usage colour. |
tints.unavailable | Normal tint | Unavailable-sample colour. |
Thresholds use the rounded, smoothed percentage shown by the item. With defaults, 0 to 59% is low, 60 to 84% is medium, and 85 to 100% is high.
Symbols accept SF Symbol names or font glyph objects. Use symbolFontWeight to set SF Symbol weight independently of text.
An item-level symbol overrides state symbols; showSymbol: false hides it regardless. State tints override the normal item/theme tint and accept #RRGGBB or #RRGGBBAA. Icon-only items retain an accessibility label, including when usage is unavailable.
To change cpu, 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, percentage, available. See text templates for syntax and field meanings. percentage uses the item’s smoothing setting and contains no percent sign.
Updates
The provider samples CPU usage every two seconds for all displays. Each item chooses its own smoothing window. A value of 1 disables smoothing; larger values average the most recent available samples, using fewer during warm-up. Text, thresholds, and accessibility use the same smoothed percentage. Raw provider events retain the latest unsmoothed reading.
Refresh policies capture the sample history, so manual and interval items retain their whole presentation until refreshed. Smoothing does not change the underlying sampling cadence. See refresh policies.
Unavailable samples
Startup, failed reads, unchanged CPU counters, and sampling gaps longer than ten seconds show CPU — by default and clear smoothing history. Failed reads and sampling restarts also reset the counter baseline; a fresh interval is needed before usage can be shown again. Unchanged counters mean there is no usable delta, not a measured 0% load.
Current limits
No per-core view or configurable decimal precision. Thresholds affect appearance only; they do not trigger actions.