diff options
| author | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2026-03-20 09:29:17 +0900 |
|---|---|---|
| committer | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2026-03-20 09:29:17 +0900 |
| commit | 50795e9a83d4229963268261caa5c212320f5ea8 (patch) | |
| tree | f4c1a5ab7e6fb5fe8d5c3fd3ac4cbbef3e291a8a | |
| parent | 11615eb131972034e24be9d0bfd7960daad19aac (diff) | |
modified statusbar/sb-forecast
| -rwxr-xr-x | ar/.local/bin/statusbar/sb-forecast | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ar/.local/bin/statusbar/sb-forecast b/ar/.local/bin/statusbar/sb-forecast index 3039abb..9c5c7aa 100755 --- a/ar/.local/bin/statusbar/sb-forecast +++ b/ar/.local/bin/statusbar/sb-forecast @@ -30,8 +30,9 @@ getweatherreport() { } getweatherreportjson() { - timeout --signal=1 10s curl -sf "$url/$location?format=j1" >"$weatherreportjson" || - error "reportjson" + tmp=$(timeout --signal=1 10s curl -sf "$url/$location?format=j1") || error "reportjson" + echo "$tmp" | jq -e '.data.weather' >/dev/null 2>&1 || error "reportjson" + echo "$tmp" >"$weatherreportjson" } # Forecast should be updated every 3 hours, but set 86400 to check once a day for reliability. |
