sbar / docsSource ↗
Workspaces provider

AeroSpace

AeroSpace workspaces, with focused or per-display scope and custom labels.

Output

The focused AeroSpace workspace name with a rectangle.3.group icon by default. Omitting the aerospace block behaves the same as aerospace: {}. Choose display scope to show each bar’s monitor, or a workspaces loop to show multiple workspaces.

Example

{
  "id": "aerospace",
  "type": "aerospace",
  "text": "{{#workspaces}}{{#name=web}}Web{{/name}}{{^name=web}}{{name}}{{/name}}{{#separator}} · {{/separator}}{{/workspaces}}{{^workspaces}}{{value}}{{/workspaces}}",
  "aerospace": {
    "scope": "display",
    "tints": {
      "focused": "#FFFFFF",
      "visible": "#88CCFF",
      "inactive": "#888888"
    }
  }
}

This lists workspaces on each bar’s display, with the focused workspace in bold. The template displays the workspace named web as Web. Lists are read-only.

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 aerospace.

PropertyDefaultDescription
showSymboltrueShow the state icon, including an item-level override.
scopefocusedfocused spans all monitors; display uses each bar’s display.
symbols.font-Shared installed font name for glyph symbols; each glyph can override it.
symbols.sizeResolved item/theme font sizeShared glyph size, 8 to 72 points; each glyph can override it.
symbols.availablerectangle.3.groupAvailable workspace state.
symbols.unavailablequestionmarkMissing or unavailable integration or display state.
tints.focusedNormal tintFocused workspace; takes precedence over visible.
tints.visibleNormal tintVisible workspace without focus.
tints.inactiveNormal tintOther list entries.
tints.unavailableNormal tintUnavailable state.

Scope and formats

With scope: "focused", the default label shows the focused workspace on every bar, and workspaces includes workspaces across all monitors. With scope: "display", only that bar’s monitor is included; the default label shows its visible workspace even when another monitor has focus. Lists emphasise the focused workspace in bold.

Use conditions on name or workspaceId to rename workspaces, or index to match their position in the scoped query order. Monitor indexes are mapped to display UUIDs when querying. A display-layout change during a query invalidates that result.

State appearance

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. Tints accept #RRGGBB or #RRGGBBAA; omitted tints inherit the normal item style. Icon-only items retain workspace or unavailable-state information in their accessibility label.

To change aerospace, 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, workspaces, separator, name, index, workspaceId, total, active, focused, visible, fullscreen, available, first, last. See workspace fields and lists for field meanings and conditions. Outside a loop, fields describe the current workspace selected by scope; inside workspaces, they describe each entry. Loops retain per-entry colour and emphasis. Separators use the inactive tint and are never bold.

Omit text for the current workspace label, or set text: "" for an icon alone. Templates do not add per-workspace click actions.

Updates

The provider polls every two seconds, with a two-second query timeout. Background queries run independently of item refresh policies. Interval refresh captures the latest polled snapshot.

Fresh queries on triggers

Manual and event triggers request a fresh AeroSpace query and capture its completed snapshot. The provider combines trigger bursts into one query. If a newer query replaces it, the older query cannot overwrite the result. Configure a manual or event refresh policy to use this behaviour:

{
  "id": "aerospace",
  "type": "aerospace",
  "refresh": { "mode": "manual" }
}
sbar trigger aerospace

Call this command from an existing AeroSpace workspace-change callback to update the bar without waiting for the next poll. Replace aerospace with the item’s ID, and add --socket <path> when targeting a custom bar socket. The bar does not modify AeroSpace configuration. See refresh policies for shared snapshot behaviour.

Current limits

Requires AeroSpace in PATH or a standard Homebrew bin directory. The installed CLI must support list-workspaces --all --json --format with workspace, workspace-is-focused, workspace-is-visible, and monitor-appkit-nsscreen-screens-id fields.

Missing installations display Aerospace not installed. Failed, empty, malformed, or incompatible output displays Aerospace unavailable; unavailable display state also uses that message. No executable-path override or built-in workspace switching control.

sbar documentation Built with Hugo · Reference reviewed 12 Sep 2026