From fd964d54b6bfaab35304543c61cf2209e4fa1430 Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Mon, 20 Mar 2023 09:50:18 -0400 Subject: customizable wttr/rate urls, sb-price improvements --- .local/bin/statusbar/sb-forecast | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to '.local/bin/statusbar/sb-forecast') 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() { -- cgit v1.3.1