summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuke Smith <luke@lukesmith.xyz>2018-05-04 13:26:56 -0700
committerGitHub <noreply@github.com>2018-05-04 13:26:56 -0700
commit869447c1e245fd95841592a12b95b101f97411dc (patch)
treeefd95d34a3db5fa8e1e6915a88cf281528464ffb
parent850ffc5365a0af36fe097237a37464a1f8afba8b (diff)
parentd76de1b4a28e468fec17bff03fcd03f54fe38ced (diff)
downloadeibhear-869447c1e245fd95841592a12b95b101f97411dc.tar.gz
eibhear-869447c1e245fd95841592a12b95b101f97411dc.tar.zst
eibhear-869447c1e245fd95841592a12b95b101f97411dc.zip
Merge pull request #43 from Daenarii/patch-2
Added location variable on i3weather script
-rwxr-xr-x.scripts/i3weather6
1 files changed, 5 insertions, 1 deletions
diff --git a/.scripts/i3weather b/.scripts/i3weather
index 2464795..d5112cc 100755
--- a/.scripts/i3weather
+++ b/.scripts/i3weather
@@ -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')