summaryrefslogtreecommitdiffstats
path: root/.scripts/statusbar
diff options
context:
space:
mode:
authorLuke Smith <luke@lukesmith.xyz>2019-05-02 17:42:48 -0400
committerLuke Smith <luke@lukesmith.xyz>2019-05-02 17:42:48 -0400
commitb79ac88a2d00ebd83a0a7fda01b899efe47213b5 (patch)
treebbdaa30adba96c568bb5fb3ed2c600151fed17af /.scripts/statusbar
parent9fd2f8cb4d96e796bc9d0dd4e8fad26c8eb80ce4 (diff)
downloadeibhear-b79ac88a2d00ebd83a0a7fda01b899efe47213b5.tar.gz
eibhear-b79ac88a2d00ebd83a0a7fda01b899efe47213b5.tar.zst
eibhear-b79ac88a2d00ebd83a0a7fda01b899efe47213b5.zip
passed arg, weather always redl
Diffstat (limited to '.scripts/statusbar')
-rwxr-xr-x.scripts/statusbar/weather4
1 files changed, 2 insertions, 2 deletions
diff --git a/.scripts/statusbar/weather b/.scripts/statusbar/weather
index 0b600cc..e298bda 100755
--- a/.scripts/statusbar/weather
+++ b/.scripts/statusbar/weather
@@ -1,5 +1,5 @@
#!/bin/sh
-location="$1"; [ -z "$location" ] || location="$location+"
+location="$1"; [ -z "$location" ] || location="$location+" && rm -f "$HOME/.local/share/weatherreport"
getforecast() { ping -q -c 1 1.1.1.1 >/dev/null || exit 1
curl -s "wttr.in/$location" > "$HOME/.local/share/weatherreport" || exit 1 ;}
@@ -17,7 +17,7 @@ case $BLOCK_BUTTON in
🌞: Daily high" ;;
esac
-if [ "$(stat -c %y "$HOME/.local/share/weatherreport" | awk '{print $1}')" != "$(date '+%Y-%m-%d')" ]
+if [ "$(stat -c %y "$HOME/.local/share/weatherreport" >/dev/null 2>&1 | awk '{print $1}')" != "$(date '+%Y-%m-%d')" ]
then getforecast && showweather
else showweather
fi