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
| Field | Type | Default | Description |
|---|---|---|---|
provider | WeatherProvider | "open-meteo" | Weather data provider. |
location | Place | {...} | Where the forecast is for: name as shown, latitude and longitude. |
units | TemperatureUnit | "region" | Temperature unit. |
format | string | "{{ temp }}{{ temp_unit }}" | Format string for the label. |
time-format | TimeFormat | "region" | Time display format for sunrise/sunset and hourly forecast. |
refresh-interval-seconds | u32 | 1800 | Polling interval in seconds. |
visual-crossing-key | Secret or null | null | Visual Crossing API key. Supports $VAR_NAME syntax to reference environment variables from .*.env files in the config directory. |
weatherapi-key | Secret or null | null | WeatherAPI.com API key. Supports $VAR_NAME syntax to reference environment variables from .*.env files in the config directory. |
icon-name | string | "ld-sun-symbolic" | Fallback icon for weather. |
border-show | bool | false | Display border around button. |
icon-show | bool | true | Display module icon. |
tooltip | bool | true | Show the module's state in a tooltip on hover. |
label-show | bool | true | Display temperature label. |
label-max-length | u32 | 0 | Max 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
| Field | Type | Default | Description |
|---|---|---|---|
border-color | ColorValue | "border-accent" | Border color token. |
icon-color | ColorValue | "auto" | Icon foreground color. Auto selects based on variant for contrast. |
icon-bg-color | ColorValue | "accent" | Icon container background color token. |
label-color | ColorValue | "fg-default" | Label text color token. |
button-bg-color | ColorValue | "bg-surface-elevated" | Button background color token. |
Click actions
| Field | Type | Default | Description |
|---|---|---|---|
left-click | ClickAction | "dropdown:weather" | Action on left click. |
right-click | ClickAction | "" | Action on right click. |
middle-click | ClickAction | "" | Action on middle click. |
scroll-up | ClickAction | "" | Action on scroll up. |
scroll-down | ClickAction | "" | 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: ""