weather-bar pulls weather reports from NOAA or Weather Underground and displays them in a desktop bar, like polybar or lemonbar. weather-bar can use geolocation to find the nearest NOAA weather station and will automatically update your location if you put your laptop to sleep and wake it up in a new location. Much like polybar and lemonbar, weather-bar is customizable. Using tokens in the config file, you can tweak the display to your liking.
$PATH
(e.g. /usr/local/bin/weather-bar
)$XDG_CONFIG_HOME
directory (default config file is ${HOME}/.config/weather-bar/config
) and edit if you desire. Install the Nerd Fonts if you want the icons in the example config to render correctly.Add a new module to your Polybar config that uses Polybar's script module to run weather-bar in tail fashion. See the config snippet in this repo for an example.
Simply pipe the output of weather-bar to lemonbar: weather-bar | lemonbar
. I recommend the patched version that supports Xft fonts so that you can have some sweet icons.
Unfortunately, Weather Underground no longer provides free keys, so you'll need one of their paid accounts to use this feature. Jerks.
By default, weather-bar fetches weather conditions from NOAA but if you sign up for a free API key, weather-bar can fetch metrics from the Weather Underground, which gives you much more frequent weather updates (5 minutes vs. 1 hour for NOAA) and the option to pull weather from the large network of personal weather stations (PWS) that send data to WU.
By default, weather-bar uses freegeoip.net to geolocate your computer and computes the Haversine distance to nearby NOAA weather stations to determine the closest one. If the geolocation is inaccurate or if you don't wish to geolocate, you can specify a specific NOAA station by its ICAO code or a Weather Underground Personal Weather Station (PWS) by its ID. You can also specify a particular latitude and longitude and weather-bar will find the nearest NOAA station automatically.
weather-bar looks best with the Font Awesome icons from Nerd Fonts. I used the "Sauce Code Pro" for the screenshot above.
See LICENSE