; Weather from the US National Weather Service, via ../scripts/weather. ; Nothing here needs an API key -- api.weather.gov is open -- but it is US-only, ; and the script wants NWS_UA pointed at a real contact address. [module/weather] type = custom/script ; scripts/ is symlinked into ~/.config/polybar the same way rofi/scripts is. exec = ~/.config/polybar/scripts/weather ; Opens $TERMINAL (wezterm if polybar did not inherit one) on `linecast weather`. click-left = ~/.config/polybar/scripts/weather detail ; The script serves a cached line until NWS_INTERVAL (15 minutes) is up, so ; polling this often costs a file read, not a request. It only sets how soon a ; refreshed line reaches the bar. interval = 300 ; The palette stays in colors.ini; the script prints plain text unless told ; otherwise, so pass the two colours it uses in from here. env-NWS_ICON_COLOR = ${colors.primary} env-NWS_ALERT_COLOR = ${colors.alert} ; Required: the script does no geolocation, so the module stays blank until ; both of these name a spot inside NWS coverage. They have to live here rather ; than in the shell profile -- polybar is started by the session, not by a login ; shell, so nothing exported from ~/.zshrc reaches it. Put a real address in ; NWS_UA too -- NWS asks for one it can contact about a misbehaving client. env-NWS_LAT = 35.0274 env-NWS_LON = -85.3184 ; env-NWS_UA = (dotfiles polybar, you@example.com) format =