mirror of
https://github.com/LukeSmithxyz/voidrice.git
synced 2026-03-20 01:37:45 +01:00
Make sb-moonphase more robust
This commit is contained in:
parent
17fe82388e
commit
f3d703bd77
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
moonfile="${XDG_DATA_HOME:-$HOME/.local/share}/moonphase"
|
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 ;}
|
{ curl -sf "wttr.in/?format=%m" > "$moonfile" || exit 1 ;}
|
||||||
|
|
||||||
icon="$(cat "$moonfile")"
|
icon="$(cat "$moonfile")"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user