Skip to main content
otter-weather fetches current conditions and a 7-day forecast from Open-Meteo. It feeds the bar weather widget or opens a popup. Set a city or coordinates. The default config runs it as a watch daemon that keeps the bar cache current.

Usage

Run otter-weather with no arguments to use your config file. With the default config, it fetches London, prints the forecast, writes the bar widget cache, and refreshes every 900 seconds. Pass a city or coordinates to override the configured location.
City names resolve through Open-Meteo geocoding before the forecast fetch. A qualified name such as Filey, UK searches Filey, then filters candidates by country or admin region. A city or coordinates on the command line always win over the config file and auto_location.

Bar widget integration

The otter-bar weather widget reads from a bounded local cache file. Use --write-cache to refresh that cache after a fetch. Add --watch SECONDS to keep it updated in the background. A typical autostart line:
The --layer flag opens the cached forecast in a small layer-shell popup that closes when clicked. Bind it to the bar widget button. The popup follows your theme, including Current and Bank profiles and generated colours, and reloads font, colour, radius, and border changes without restarting.
Responses are capped at 128 KiB, so the cache file stays small and fetch time stays predictable.

Configuration

otter-weather reads ~/.config/otter-shell/otter-weather.conf.
  • auto_location: true derives city and coordinates from your public IP (via ipapi.co) before fetching. Command-line locations still win
  • city: city name to geocode. When city is set, it takes precedence over latitude and longitude
  • latitude / longitude: your location, used when city is empty
  • cache_path: cache file location. Empty uses the default XDG cache location
  • write_cache: write the bar widget cache after each fetch
  • watch_seconds: refresh interval in seconds. 0 fetches once and exits. Config reloads between refreshes, so you can change location without restarting the daemon
Find your coordinates at Open-Meteo’s geocoding API or use a site like latlong.net.