Merge pull request #114 from kubetz/i3weather
Reposition ping and add failsafe tail
This commit is contained in:
commit
8e81c30a5d
1 changed files with 2 additions and 2 deletions
|
@ -6,9 +6,9 @@ location=""
|
|||
|
||||
[ "$BLOCK_BUTTON" = "1" ] && $TERMINAL -e popweather
|
||||
|
||||
curl -s wttr.in/$location > ~/.weatherreport
|
||||
ping -q -w 1 -c 1 "$(ip r | grep default | tail -1 | 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 -s wttr.in/$location > ~/.weatherreport
|
||||
|
||||
printf "%s" "$(sed '16q;d' ~/.weatherreport | grep -wo "[0-9]*%" | sort -n | sed -e '$!d' | sed -e "s/^/☔ /g" | tr -d '\n')"
|
||||
|
||||
|
|
Loading…
Reference in a new issue