This is a python3 script that queries OpenWeatherApi to fetch the current weather data. The temp is in metric.
You'll have to set your API_KEY and CITY in the $HOME/.config/polybar/data/cred.json
Clone this repo in $HOME/.config/polybar/modules/weather/
- SSH: git clone [email protected]:SushiJ/polybar-weather-module.git
- HTTPS: git clone https://github.com/SushiJ/polybar-weather-module.git
The follow snippet shows an example for integrating this script with polybar.
[module/weather]
type = custom/script
exec = "python3 $HOME/.config/polybar/modules/weather/app.py"
; Call every 15 minutes
interval = 900
format = <label>
format-prefix-foreground = ${colors.foreground}
label = %output:0:50%
follow polybar for more info on running custom scripts