summaryrefslogtreecommitdiffstats
path: root/.local/bin/statusbar/sb-forecast
diff options
context:
space:
mode:
Diffstat (limited to '.local/bin/statusbar/sb-forecast')
-rwxr-xr-x.local/bin/statusbar/sb-forecast3
1 files changed, 2 insertions, 1 deletions
diff --git a/.local/bin/statusbar/sb-forecast b/.local/bin/statusbar/sb-forecast
index 2a6440b..2b41b3d 100755
--- a/.local/bin/statusbar/sb-forecast
+++ b/.local/bin/statusbar/sb-forecast
@@ -3,10 +3,11 @@
# Displays today's precipication chance (☔), and daily low (🥶) and high (🌞).
# Usually intended for the statusbar.
+url="${WTTRURL:-wttr.in}"
weatherreport="${XDG_CACHE_HOME:-$HOME/.cache}/weatherreport"
# Get a weather report from 'wttr.in' and save it locally.
-getforecast() { curl -sf "wttr.in/$LOCATION" > "$weatherreport" || exit 1; }
+getforecast() { curl -sf "$url/$LOCATION" > "$weatherreport" || exit 1; }
# Forecast should be updated only once a day.
checkforecast() {