From cbd1d349a511da7a861540a5d6ea954d4d06871b Mon Sep 17 00:00:00 2001 From: TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> Date: Sat, 28 Jun 2025 19:03:01 +0900 Subject: updates --- ar/.local/bin/statusbar/sb-forecast | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'ar/.local/bin/statusbar/sb-forecast') 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" } -- cgit v1.2.3