2018-12-21 17:35:24 +00:00
|
|
|
#!/bin/sh
|
|
|
|
# Updates weather forecast
|
|
|
|
ping -q -w 1 -c 1 "$(ip r | grep default | tail -1 | cut -d ' ' -f 3)" >/dev/null || exit
|
|
|
|
location="$1"; [ -z "$location" ] || location="$location+"
|
2019-01-02 16:09:31 +00:00
|
|
|
curl -s "wttr.in/$location" > /tmp/weatherreport
|
2018-12-21 17:35:24 +00:00
|
|
|
pkill -RTMIN+5 i3blocks && notify-send "🌞 Weather forecast updated."
|