Merge pull request #43 from Daenarii/patch-2

Added location variable on i3weather script
This commit is contained in:
Luke Smith 2018-05-04 13:26:56 -07:00 committed by GitHub
commit 869447c1e2

View file

@ -4,7 +4,11 @@
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')