diff options
| author | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2025-06-09 17:53:07 +0900 |
|---|---|---|
| committer | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2025-06-09 17:53:07 +0900 |
| commit | 8318c64ccdccf974e7865ba9f4a3ef46c25a4584 (patch) | |
| tree | c28eb2abfff899e96664e6e16eddb24934e1867d | |
| parent | 4ed10d5f6aeb08a9fb02543d82ceaec87adfb84d (diff) | |
modified statusbar/sb-forecast
| -rwxr-xr-x | ar/.local/bin/statusbar/sb-forecast | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ar/.local/bin/statusbar/sb-forecast b/ar/.local/bin/statusbar/sb-forecast index c02e117..73f084e 100755 --- a/ar/.local/bin/statusbar/sb-forecast +++ b/ar/.local/bin/statusbar/sb-forecast @@ -29,7 +29,7 @@ getweatherreportjson() { # Forecast should be updated every 3 hours, but set 86400 to check once a day for reliability. checkforecast() { - [ -s "$1" ] && [ "$(($(date +%s) - $(stat -c %Y "$1")))" -le 86400 ] + [ -s "$1" ] && [ "$(($(date +%s) - $(stat -c %Y "$1")))" -le "$2" ] } get_current_hour() { date +%H | sed 's/^0*//'; } @@ -360,6 +360,6 @@ After $secs seconds, new clicks will also automatically update the doppler RADAR 8) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;; esac -checkforecast "$weatherreport" || { getweatherreport && pkill -RTMIN+15 "${STATUSBAR:-dwmblocks}" && sleep 3; } -checkforecast "$weatherreportjson" || { getweatherreportjson && pkill -RTMIN+15 "${STATUSBAR:-dwmblocks}" && sleep 3; } +checkforecast "$weatherreport" "3600" || { getweatherreport && pkill -RTMIN+15 "${STATUSBAR:-dwmblocks}" && sleep 3; } +checkforecast "$weatherreportjson" "86400" || { getweatherreportjson && pkill -RTMIN+15 "${STATUSBAR:-dwmblocks}" && sleep 3; } showweather |
