A lightweight weather caching system for Linux. Fetches current conditions and forecasts from Open-Meteo (with wttr.in fallback) and optionally weather alerts from Environment Canada. Includes a Waybar widget for displaying weather in your status bar.
- Current temperature, feels-like, wind, humidity, and condition
- 3-day forecast
- Environment Canada weather alerts (optional, for Canadian locations)
- Waybar custom module with emoji icons and detailed tooltip
- Runs on a systemd timer (every 15 minutes)
- Fallback data source if primary fails
- No API keys required — all sources are free and public
bash,curl,python3systemd(for automatic updates)- Waybar (optional, for the status bar widget)
# Copy scripts
cp weather-cache waybar-weather ~/.local/bin/
chmod +x ~/.local/bin/weather-cache ~/.local/bin/waybar-weather
# Create config
mkdir -p ~/.config/weather-cache
cp weather-cache.conf.example ~/.config/weather-cache/weather-cache.conf
# Edit the config with your location:
$EDITOR ~/.config/weather-cache/weather-cache.conf
# Install and start the systemd timer
cp weather-cache.service weather-cache.timer ~/.config/systemd/user/
systemctl --user daemon-reload
systemctl --user enable --now weather-cache.timer
# Optional: install Claude Code /weather skill globally
mkdir -p ~/.claude/skills/weather
cp .claude/skills/weather/SKILL.md ~/.claude/skills/weather/SKILL.mdEdit ~/.config/weather-cache/weather-cache.conf:
| Variable | Required | Description |
|---|---|---|
LATITUDE |
Yes | Location latitude (e.g. 43.65) |
LONGITUDE |
Yes | Location longitude (e.g. -79.38) |
LOCATION_NAME |
Yes | City name for wttr.in fallback (e.g. Toronto Ontario) |
UNITS |
No | metric (°C, km/h) or imperial (°F, mph). Default: metric |
TIMEZONE |
No | Timezone (auto-detected from /etc/timezone if not set) |
CACHE_DIR |
No | Cache directory (default: ~/.cache/weather) |
ALERT_BBOX |
No | Bounding box for Environment Canada alerts (lon_min,lat_min,lon_max,lat_max) |
ALERT_FILTER |
No | Filter alerts by area name (defaults to LOCATION_NAME) |
You can also override the config path with WEATHER_CACHE_CONF=/path/to/conf.
Add a custom module to your Waybar config:
"custom/weather": {
"exec": "~/.local/bin/waybar-weather",
"return-type": "json",
"interval": 300
}The widget shows an emoji + temperature (e.g. ☀️ 22°C) with a detailed tooltip on hover including feels-like, wind, humidity, forecast, and any active alerts.
Weather data is cached as plain text in ~/.cache/weather/:
conditions.txt— current conditions and 3-day forecastalerts.txt— weather alerts (ifALERT_BBOXis configured)weather-cache.log— error log (auto-rotated)
This makes it easy to read from other tools (scripts, voice assistants, etc.).
| Source | Used for | Fallback |
|---|---|---|
| Open-Meteo | Current conditions + forecast | Primary |
| wttr.in | Current conditions + forecast | If Open-Meteo fails |
| Environment Canada GeoMet | Weather alerts | Optional (Canada only) |
All sources are free and require no API keys.