diff options
| author | Luke Smith <luke@lukesmith.xyz> | 2023-03-20 09:50:18 -0400 |
|---|---|---|
| committer | Luke Smith <luke@lukesmith.xyz> | 2023-03-20 09:50:18 -0400 |
| commit | fd964d54b6bfaab35304543c61cf2209e4fa1430 (patch) | |
| tree | 3a61fec78f1e2f95560c1d9870c294f3185a0ffc /.local/bin/statusbar/sb-forecast | |
| parent | 37930fdf573c4834e080c4a2ea94706c5465071c (diff) | |
| download | eibhear-fd964d54b6bfaab35304543c61cf2209e4fa1430.tar.gz eibhear-fd964d54b6bfaab35304543c61cf2209e4fa1430.tar.zst eibhear-fd964d54b6bfaab35304543c61cf2209e4fa1430.zip | |
customizable wttr/rate urls, sb-price improvements
Diffstat (limited to '.local/bin/statusbar/sb-forecast')
| -rwxr-xr-x | .local/bin/statusbar/sb-forecast | 3 |
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() { |
