summaryrefslogtreecommitdiff
path: root/ar/.local/bin/statusbar/sb-forecast
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-forecast
parent74cb5de14fc06fe97b6fc306f6176f7d6b467b6b (diff)
updates
Diffstat (limited to 'ar/.local/bin/statusbar/sb-forecast')
-rwxr-xr-xar/.local/bin/statusbar/sb-forecast6
1 files changed, 3 insertions, 3 deletions
diff --git a/ar/.local/bin/statusbar/sb-forecast b/ar/.local/bin/statusbar/sb-forecast
index 8ac571b..d9dded0 100755
--- a/ar/.local/bin/statusbar/sb-forecast
+++ b/ar/.local/bin/statusbar/sb-forecast
@@ -3,7 +3,7 @@
# Displays today's snow chance (🏂), precipication chance (☔), humidity (💧), wind speed (🎐), and current (feel like) temperature (🌞).
# Usually intended for the statusbar.
-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(",")')
url="${WTTRURL:-wttr.in}"
weatherreport="${XDG_CACHE_HOME:-${HOME}/.cache}/weatherreport"
@@ -17,13 +17,13 @@ error() {
# Get a weather report from 'wttr.in' and save it locally.
getweatherreport() {
- (timeout --signal=1 10s curl -sf "$url/$LOCATION" >"$weatherreport" &&
+ (timeout --signal=1 10s curl -sf "$url/$location" >"$weatherreport" &&
printf "\nUpdated: %s\n" "$(date '+%Y-%m-%d %H:%M:%S')" >>"$weatherreport") ||
error "report"
}
getweatherreportjson() {
- timeout --signal=1 10s curl -sf "$url/$LOCATION?format=j1" >"$weatherreportjson" ||
+ timeout --signal=1 10s curl -sf "$url/$location?format=j1" >"$weatherreportjson" ||
error "reportjson"
}