Output #

The rounded temperature and an icon for the current conditions, such as 18°C. A weather item requires latitude and longitude. It does not request location permission or look up your position.

Before the first reading, the item shows Weather unavailable with a question-mark icon. If a later request fails, sbar keeps the last reading and marks it stale. A successful request clears the stale state.

Configuration #

Set these options inside weather:

PropertyDefaultDescription
latitudeRequiredLatitude from -90 to 90.
longitudeRequiredLongitude from -180 to 180.
temperatureUnitcelsiuscelsius or fahrenheit.
windSpeedUnitkmhkmh, mph, ms, or kn.
pollInterval900Seconds between completed requests, from 60 to 86,400.
showSymboltrueShow a condition icon; false also hides an item-level symbol.
symbols.font-Shared installed font name for glyph symbols; each glyph can override it.
symbols.sizeResolved item/theme font sizeShared glyph size, from 8 to 72 points; each glyph can override it.
symbols condition keysIcons belowOverride individual condition icons.

Temperature and wind conversions happen before sbar rounds the displayed values.

Condition symbols #

Clear and partly cloudy conditions use different icons for day and night. Other weather codes map to cloud, fog, drizzle, rain, sleet, snow, shower, and storm icons. Unknown codes use questionmark.

Override individual icons with these weather.symbols keys:

ConditionsKeys
Clear and mainly clearclearDay, clearNight
Partly cloudypartlyCloudyDay, partlyCloudyNight
Overcastovercast; unreleased builds also accept overcastDay and overcastNight
Fogfog
Drizzle and raindrizzle, freezingDrizzle, rain, freezingRain
Snow and showerssnow, rainShowers, snowShowers
Stormsthunderstorm, thunderstormHail
Other statesunknown, unavailable

Strings name SF Symbols. Glyph objects use their own font and size or inherit them from the symbols block:

{
  "id": "weather",
  "type": "weather",
  "symbolPosition": "right",
  "weather": {
    "latitude": 53.4808,
    "longitude": -2.2426,
    "symbols": {
      "font": "Symbols Nerd Font Mono",
      "size": 16,
      "clearDay": "sun.max.fill",
      "clearNight": "moon.stars.fill",
      "overcast": "cloud.fill",
      "rain": { "glyph": "\uf0e9" },
      "rainShowers": { "glyph": "\uf0e9" }
    }
  }
}

In v0.0.1, overcast overrides the icon for both day and night. Unreleased builds from main also accept overcastDay and overcastNight. Those builds select the day or night entry using the location’s daylight flag, falling back to overcast, then the built-in cloud.fill icon when the entry is omitted or null. See release compatibility.

Other omitted or null entries keep the built-in icons. unknown covers unrecognised weather codes, while unavailable applies before a reading exists. A stale reading keeps its condition icon. An item-level symbol overrides every condition. weather.showSymbol: false hides all of them. See font glyph symbols for font requirements.

Text templates #

The item-level text setting supports these fields:

FieldValue
temperature, feelsLikeRounded temperature in the selected unit.
temperatureUnit°C or °F.
humidityRounded relative humidity percentage, without %.
windSpeed, windSpeedUnitRounded speed and km/h, mph, m/s, or kn.
condition, weatherCodeEnglish condition and Open-Meteo WMO code.
isDaytrue when the location is in daylight.
updatedAtAPI data timestamp in ISO 8601 UTC format.
availableA current or retained stale reading exists.
staleThe last request failed and sbar retained an earlier reading.
statusavailable, stale, or unavailable.
valueDefault temperature label, or Weather unavailable.

Missing optional measurements produce empty strings. updatedAt is the API’s data timestamp, not the time sbar fetched it.

{
  "id": "weather",
  "type": "weather",
  "weather": { "latitude": 51.5074, "longitude": -0.1278 },
  "text": "{{#available}}{{temperature}}{{temperatureUnit}} · {{condition}}{{#stale}} *{{/stale}}{{/available}}{{^available}}Weather unavailable{{/available}}"
}

Set text to an empty string for an icon alone. See text templates for conditions, shared fields, and symbol placement.

Updates #

sbar fetches weather immediately, then waits pollInterval seconds after each request finishes. Items with identical coordinates share one request across displays, even if they use different display units. The shortest interval among enabled items at that location applies. Removing the last item for a location cancels its requests. Changing the interval restarts polling, while cosmetic changes do not.

Requests time out after 15 seconds. A failed request retains the last reading and sets stale; stale does not mean that a reading passed an age threshold.

Refresh policies control presentation snapshots separately from network polling. Manual items receive their first successful reading, then hold it until triggered. Changing coordinates clears the previous location’s snapshot. Changing units reformats the held reading without another request.

Provider value events use the item ID and the default Celsius label. Text templates and display units do not change that event value.

Current limits #

Current conditions are weather-model estimates. sbar does not support automatic location lookup, custom Open-Meteo endpoints, or API keys.

Weather data comes from Open-Meteo under CC BY 4.0. sbar uses the keyless, non-commercial API. See Open-Meteo’s plans for service limits and commercial access.

Example #

{
  "id": "weather",
  "type": "weather",
  "weather": {
    "latitude": 51.5074,
    "longitude": -0.1278,
    "temperatureUnit": "celsius",
    "windSpeedUnit": "kmh",
    "pollInterval": 900
  }
}

This shows current weather for central London and updates it every 15 minutes after each completed request.

Search docs

Enter a word or command.