summaryrefslogtreecommitdiff
path: root/ar/.local/bin/statusbar/sb-clock
diff options
context:
space:
mode:
authorTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2025-06-28 19:03:01 +0900
committerTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2025-06-28 19:03:01 +0900
commitcbd1d349a511da7a861540a5d6ea954d4d06871b (patch)
tree92b932d351a9474e7fd0f12c6c973274daaaa0d9 /ar/.local/bin/statusbar/sb-clock
parent74cb5de14fc06fe97b6fc306f6176f7d6b467b6b (diff)
updates
Diffstat (limited to 'ar/.local/bin/statusbar/sb-clock')
-rwxr-xr-xar/.local/bin/statusbar/sb-clock4
1 files changed, 2 insertions, 2 deletions
diff --git a/ar/.local/bin/statusbar/sb-clock b/ar/.local/bin/statusbar/sb-clock
index 331c62f..a5992a5 100755
--- a/ar/.local/bin/statusbar/sb-clock
+++ b/ar/.local/bin/statusbar/sb-clock
@@ -43,11 +43,11 @@ else
fi
# Shows the current moon phase.
-LOCATION=$(curl -s http://ip-api.com/json | jq -r '[.regionName, .countryCode] | join(",")')
+location=$(curl -s http://ip-api.com/json | jq -r '[.regionName, .countryCode] | join(",")')
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")
+ moon=$(curl -sf "wttr.in/$location?format=%m")
[ -n "$moon" ] && grep -vq 'Unknown location' "$moon" && echo "$moon" >"$moonfile"
fi