A simple weather module for polybar based on your the location of your current ip
- python3
- polybar
- OpenWeatherMap API key
- ipstack API key
- Install python3
- Install polybar
- Get a free OpenWeatherMap API key by registering at https://home.openweathermap.org/users/sign_up
- Get a free ipstack API key by registering at https://ipstack.com/product
- Enter your API keys into geoweather.py
- Add the module to your polybar bar
- Reload polybar
Standard output will be celsius. Use -f for Fahrenheit and -k for Kelvin.
geoweather.py -k
geoweather.py -f
[module/weather]
type = custom/script
interval = 600
format-prefix = " "
format = <label>
exec = python3 /path/to/geoweather.py
exec-if = ping openweathermap.org -c 1
format-underline = ${colors.primary}