sbar / docsSource ↗
Connectivity provider

Network

Wi-Fi, Connected, or Offline based on the current network path.

Output

Wi-Fi, Connected, or Offline based on the current network path, with a state-dependent icon. Omitting the network block behaves the same as network: {}. Use an interface filter for Wi-Fi or another connection type.

Example

{
  "id": "network",
  "type": "network",
  "network": {
    "tints": {
      "offline": "#FF6655"
    }
  },
  "text": ""
}

This icon-only example uses the default connection symbols and retains the connection label for accessibility. Remove text: "" to show text alongside the icon.

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

PropertyDefaultDescription
showSymboltrueShow the state icon; false hides even an item-level symbol override.
hideWhenDisconnectedfalseHide the item in its offline state, including when an interface filter does not match.
interface-Follow the active connection, or filter by wifi, ethernet, cellular, or other.
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 state keysIcons belowOverride symbols for wifi, ethernet, cellular, other, or offline.
tints state keysNormal tintState colours for the same five states; accept #RRGGBB or #RRGGBBAA.

Connection symbols

Without an interface filter, these are the default symbols and labels:

State keyDefault symbolDefault label
wifiwifiWi-Fi
ethernetcable.connectorConnected
cellularantenna.radiowaves.left.and.rightConnected
othernetworkConnected
offlinenetwork.slashOffline
{
  "id": "network",
  "type": "network",
  "network": {
    "symbols": {
      "font": "Menlo",
      "ethernet": {
        "glyph": "E",
        "size": 16
      },
      "offline": "network.slash"
    },
    "tints": {
      "ethernet": "#66CC88",
      "offline": "#FF6655"
    }
  },
  "text": "{{#status=ethernet}}Wired{{/status}}{{^status=ethernet}}{{#status=offline}}Disconnected{{/status}}{{^status=offline}}{{value}}{{/status}}{{/status}}"
}

Symbols accept SF Symbol names or font glyph objects. Use symbolFontWeight to set SF Symbol weight independently of text.

An item-level symbol overrides the state icon; showSymbol: false hides it regardless. Omitted state symbols use the built-in defaults. State tints override the normal item/theme tint. Text templates retain the default accessibility label.

Interface filtering

To monitor Wi-Fi specifically:

{
  "id": "wifi",
  "type": "network",
  "network": {
    "hideWhenDisconnected": true,
    "interface": "wifi",
    "tints": {
      "wifi": "#66CC88",
      "offline": "#FF6655"
    }
  },
  "text": ""
}

The filtered item shows offline when a different interface is active. Wi-Fi filtering defaults to Wi-Fi connected / Wi-Fi disconnected and wifi / wifi.slash. Other filters use labels such as Ethernet connected / Ethernet disconnected and the normal state icons. Override filtered labels with top-level text conditions and colours with the selected interface key and offline. With hideWhenDisconnected: true, the offline item is hidden instead of showing its label, icon, or tint.

Runtime changes

The item-level fixed symbol can be changed temporarily:

sbar set network symbol '"network"'
sbar set network symbol null

Clearing the override restores the state icon, unless network.showSymbol is false. Replace network with the item’s ID. To change network, 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, status, connected. See text templates for syntax and field meanings. status and connected respect the configured interface filter.

Updates

The provider follows native network-path events. Refresh policies capture the connection state, label, symbol, tint, and visibility together. Interval and manual policies hold that snapshot until the next refresh or trigger, including when the interface changes but its default text remains Connected. See refresh policies.

Current limits

An unsatisfied path is Offline. For a satisfied path, Wi-Fi takes precedence over Ethernet, then cellular, then other when macOS reports multiple interface types. Filtering applies to that classified active path, not every connected adapter, and does not identify VPNs. Use the VPN provider for registered VPN service names and connection states.

No radio power, association, address, SSID, or signal strength is reported. A satisfied path is not an internet reachability test.

sbar documentation Built with Hugo · Reference reviewed 12 Sep 2026