Added location variable
Manually put location by suffixing it to the wttr.in link
This commit is contained in:
parent
850ffc5365
commit
d76de1b4a2
1 changed files with 5 additions and 1 deletions
|
@ -4,7 +4,11 @@
|
||||||
|
|
||||||
ping -q -w 1 -c 1 `ip r | grep default | cut -d ' ' -f 3` >/dev/null || exit
|
ping -q -w 1 -c 1 `ip r | grep default | cut -d ' ' -f 3` >/dev/null || exit
|
||||||
|
|
||||||
curl wttr.in > ~/.weatherreport
|
### This is only if your location isn't automatically detected, otherwise you can leave it blank.
|
||||||
|
loc=""
|
||||||
|
location=${loc// /+}
|
||||||
|
|
||||||
|
curl wttr.in/~$location > ~/.weatherreport
|
||||||
|
|
||||||
echo -n ☔ $(cat ~/.weatherreport | sed -n 16p | sed -e 's/[^m]*m//g' | grep -o "[0-9]*%" | sort -n | sed -e '$!d')
|
echo -n ☔ $(cat ~/.weatherreport | sed -n 16p | sed -e 's/[^m]*m//g' | grep -o "[0-9]*%" | sort -n | sed -e '$!d')
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue