summaryrefslogtreecommitdiffstats
path: root/.local/bin/statusbar/sb-moonphase
diff options
context:
space:
mode:
Diffstat (limited to '.local/bin/statusbar/sb-moonphase')
-rwxr-xr-x.local/bin/statusbar/sb-moonphase2
1 files changed, 1 insertions, 1 deletions
diff --git a/.local/bin/statusbar/sb-moonphase b/.local/bin/statusbar/sb-moonphase
index fab8b4d..5eb1875 100755
--- a/.local/bin/statusbar/sb-moonphase
+++ b/.local/bin/statusbar/sb-moonphase
@@ -4,7 +4,7 @@
moonfile="${XDG_DATA_HOME:-$HOME/.local/share}/moonphase"
-[ "$(stat -c %y "$moonfile" 2>/dev/null | cut -d' ' -f1)" = "$(date '+%Y-%m-%d')" ] ||
+[ ! -s "$moonfile" ] && [ "$(stat -c %y "$moonfile" 2>/dev/null | cut -d' ' -f1)" = "$(date '+%Y-%m-%d')" ] ||
{ curl -sf "wttr.in/?format=%m" > "$moonfile" || exit 1 ;}
icon="$(cat "$moonfile")"