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 your latitude and longitude, run it as a watch daemon, and weather shows up on your desktop.

Usage

Run otter-weather without arguments to fetch and print a forecast for the configured location. Pass coordinates to override the config.
otter-weather                             # fetch and print (default: London)
otter-weather 40.7128 -74.0060            # specify coordinates (New York)
otter-weather --dry-run 51.5072 -0.1276   # print Open-Meteo URL without fetching
otter-weather --write-cache               # refresh bar widget cache
otter-weather --watch 900 --write-cache   # refresh every 900 seconds
otter-weather --cache                     # print cached forecast without HTTP
otter-weather --layer                     # open 7-day popup from cache

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:
otter-weather --watch 900 --write-cache &
The --layer flag opens the cached forecast in a small layer-shell popup that closes when clicked. Bind it to the bar widget button.
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.
latitude = 51.5072
longitude = -0.1276
# Optional; empty uses $XDG_CACHE_HOME/otter-shell/weather-cache
cache_path = ""
write_cache = false
watch_seconds = 0
  • latitude / longitude: your location (default is London)
  • cache_path: cache file location. Empty uses the default XDG cache location
  • write_cache: write cache after fetch
  • watch_seconds: refresh interval in watch mode. 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.