diff options
| author | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2025-06-11 05:40:54 +0900 |
|---|---|---|
| committer | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2025-06-11 05:40:54 +0900 |
| commit | 70ef4fa5566c9c8f1c875009fd90a03cf7a999da (patch) | |
| tree | 30faed8aeb501ddcad57a85aaf9c73cac8f56a03 | |
| parent | 0284873590c5bd8883d6f92301d6df4ddc682339 (diff) | |
modified statusbar/sb-clock
| -rwxr-xr-x | ar/.local/bin/statusbar/sb-clock | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ar/.local/bin/statusbar/sb-clock b/ar/.local/bin/statusbar/sb-clock index 25c6efb..6bf69ac 100755 --- a/ar/.local/bin/statusbar/sb-clock +++ b/ar/.local/bin/statusbar/sb-clock @@ -48,7 +48,7 @@ moonfile="${XDG_DATA_HOME:-${HOME}/.local/share}/wallpapers/moonphase" if [ ! -s "$moonfile" ] || [ "$(stat -c %y "$moonfile" 2>/dev/null | cut -d' ' -f1)" != "$(date '+%Y-%m-%d')" ]; then moon=$(curl -sf "wttr.in/$LOCATION?format=%m") - [ -n "$moon" ] && echo "$moon" >"$moonfile" + [ -n "$moon" ] && grep -vq 'Unknown location' "$moon" && echo "$moon" >"$moonfile" fi moonicon="$(cat "$moonfile")" @@ -77,4 +77,4 @@ case $BLOCK_BUTTON in esac # Output the formatted date and time -date "+${moonicon-$calendar}%a,%d $icon%H:%M" +date "+${moonicon:-$calendar}%a,%d $icon%H:%M" |
