Dotfiles-dwm/dwmbar/modules/weather

16 lines
254 B
Plaintext
Raw Normal View History

2024-06-02 11:02:06 +00:00
#!/bin/bash
# Deps:
# curl
get_weather()
{
curl -s v2.wttr.in | grep -e "Weather" | sed -n 2p | sed s/Weather://g | sed 's/,//g' | sed 's/+//g' | sed 's/°C.*/°C/' | sed 's/.*m//'
}
if [ $(( 10#$(date '+%S') % 30 )) -eq 0 ]; then
get_weather
fi