Skip to content

weather ​

Current conditions with hourly and daily forecasts in a dropdown.

Add it to your layout with weather:

yaml
bar:
  layout:
    - monitor: "*"
      right: [weather]

General ​

FieldTypeDefaultDescription
providerWeatherProvider"open-meteo"Weather data provider.
locationstring"San Francisco"Location for weather data (city name or "lat,lon" coordinates).
unitsTemperatureUnit"metric"Temperature unit.
formatstring"{{ temp }}{{ temp_unit }}"Format string for the label.
time-formatTimeFormat"12h"Time display format for sunrise/sunset and hourly forecast.
refresh-interval-secondsu321800Polling interval in seconds.
visual-crossing-keystring or nullnullVisual Crossing API key. Supports $VAR_NAME syntax to reference environment variables from .*.env files in the config directory.
weatherapi-keystring or nullnullWeatherAPI.com API key. Supports $VAR_NAME syntax to reference environment variables from .*.env files in the config directory.
icon-namestring"ld-sun-symbolic"Fallback icon for weather.
border-showboolfalseDisplay border around button.
icon-showbooltrueDisplay module icon.
label-showbooltrueDisplay temperature label.
label-max-lengthu320Max label characters before truncation with ellipsis. Set to 0 to disable.
More about format

Placeholders ​

  • {{ temp }} - Current temperature (e.g., "72")
  • {{ temp_unit }} - Temperature unit symbol ("°F" or "°C")
  • {{ feels_like }} - Feels-like temperature
  • {{ condition }} - Weather condition text (e.g., "Cloudy")
  • {{ humidity }} - Humidity percentage (e.g., "65%")
  • {{ wind_speed }} - Wind speed with unit (e.g., "12 km/h")
  • {{ wind_dir }} - Wind direction (e.g., "NW")
  • {{ high }} - Today's high temperature
  • {{ low }} - Today's low temperature

Examples ​

  • "{{ temp }}{{ temp_unit }}" - "22°C"
  • "{{ temp }}{{ temp_unit }} {{ condition }}" - "22°C Partly Cloudy"
  • "{{ temp }}{{ temp_unit }} H:{{ high }} L:{{ low }}" - "22°C H:25 L:18"

Colors ​

FieldTypeDefaultDescription
border-colorColorValue"border-accent"Border color token.
icon-colorColorValue"auto"Icon foreground color. Auto selects based on variant for contrast.
icon-bg-colorColorValue"accent"Icon container background color token.
label-colorColorValue"fg-default"Label text color token.
button-bg-colorColorValue"bg-surface-elevated"Button background color token.

Click actions ​

FieldTypeDefaultDescription
left-clickClickAction"dropdown:weather"Action on left click.
right-clickClickAction""Action on right click.
middle-clickClickAction""Action on middle click.
scroll-upClickAction""Action on scroll up.
scroll-downClickAction""Action on scroll down.

Default configuration ​

yaml
modules:
  weather:
    provider: open-meteo
    location: San Francisco
    units: metric
    format: '{{ temp }}{{ temp_unit }}'
    time-format: 12h
    refresh-interval-seconds: 1800
    icon-name: ld-sun-symbolic
    border-show: false
    border-color: border-accent
    icon-show: true
    icon-color: auto
    icon-bg-color: accent
    label-show: true
    label-color: fg-default
    label-max-length: 0
    button-bg-color: bg-surface-elevated
    left-click: dropdown:weather
    right-click: ""
    middle-click: ""
    scroll-up: ""
    scroll-down: ""

Released under the MIT License.