mirror of
https://git.adityakumar.xyz/dwmbar.git
synced 2024-12-23 05:22:53 +00:00
16 lines
277 B
Bash
Executable file
16 lines
277 B
Bash
Executable file
#!/bin/bash
|
|
|
|
# Deps:
|
|
# curl
|
|
|
|
|
|
get_weather()
|
|
{
|
|
CITY=Chandigarh
|
|
curl -s v2.wttr.in/$CITY | 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
|