The weather.sh segment currently calls:
curl -s "https://api.met.no/weatherapi/locationforecast/2.0/compact?lat=$lat&lon=$lon"
without any custom User-Agent header.
Since late 2023, api.met.no strictly enforces a requirement for an identifying User-Agent.
Requests without one now return HTTP 403 and can cause temporary IP bans.
Proposed fix:
- Add a -H "User-Agent: ..." option (defaulting to "tmux-powerline/<version> (<github url>)")
- Or allow override via TMUX_POWERLINE_SEG_WEATHER_USER_AGENT environment variable.
Reference:
https://api.met.no/doc/TermsOfService