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.
locationPlace{...}Where the forecast is for: name as shown, latitude and longitude.
unitsTemperatureUnit"region"Temperature unit.
formatstring"{{ temp }}{{ temp_unit }}"Format string for the label.
time-formatTimeFormat"region"Time display format for sunrise/sunset and hourly forecast.
refresh-interval-secondsu321800Polling interval in seconds.
visual-crossing-keySecret or nullnullVisual Crossing API key. Supports $VAR_NAME syntax to reference environment variables from .*.env files in the config directory.
weatherapi-keySecret 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.
tooltipbooltrueShow the module's state in a tooltip on hover.
label-showbooltrueDisplay temperature label.
label-max-lengthu320Max label characters before truncation with ellipsis. Set to 0 to disable.
More about location

The former "latitude,longitude" string still reads, as a place without a name; a city name alone is refused, since looking it up picked the first of every place with that name.

More about format

Placeholders ​

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

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:
      latitude: 37.7749
      longitude: -122.4194
      name: San Francisco
    units: region
    format: '{{ temp }}{{ temp_unit }}'
    time-format: region
    refresh-interval-seconds: 1800
    icon-name: ld-sun-symbolic
    border-show: false
    border-color: border-accent
    icon-show: true
    tooltip: 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.