diff options
| author | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2026-03-18 15:22:54 +0900 |
|---|---|---|
| committer | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2026-03-18 15:22:54 +0900 |
| commit | 8f1dbd14cb93067ebf8237a117ce0724939ea41a (patch) | |
| tree | ada19fa6218333d1141411fdfc192daa62597495 | |
| parent | e7e178b44ed7b9c7113fecaea2ce9b4152e1290e (diff) | |
modified statusbar/sb-forecast
| -rwxr-xr-x | ar/.local/bin/statusbar/sb-forecast | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ar/.local/bin/statusbar/sb-forecast b/ar/.local/bin/statusbar/sb-forecast index d2b49a8..3039abb 100755 --- a/ar/.local/bin/statusbar/sb-forecast +++ b/ar/.local/bin/statusbar/sb-forecast @@ -44,12 +44,12 @@ get_current_hour() { date +%H | sed 's/^0*//'; } get_nearest_hourly() { current_hour=$(get_current_hour) hour_index=$((current_hour / 3)) - jq ".weather[0].hourly[$hour_index]" "$weatherreportjson" + jq ".data.weather[0].hourly[$hour_index]" "$weatherreportjson" } getprecip() { get_nearest_hourly | jq -r '.chanceofrain'; } -gethighprecip() { jq -r '.weather[0].hourly[].chanceofrain' "$weatherreportjson" | sort -rn | head -1; } +gethighprecip() { jq -r '.data.weather[0].hourly[].chanceofrain' "$weatherreportjson" | sort -rn | head -1; } getsnow() { get_nearest_hourly | jq -r '.chanceofsnow'; } @@ -59,9 +59,9 @@ gettemp() { get_nearest_hourly | jq -r '.tempC'; } getfeelslike() { get_nearest_hourly | jq -r '.FeelsLikeC'; } -getlowtemp() { jq -r '.weather[0].hourly[].tempC' "$weatherreportjson" | sort -n | head -1; } +getlowtemp() { jq -r '.data.weather[0].hourly[].tempC' "$weatherreportjson" | sort -n | head -1; } -gethightemp() { jq -r '.weather[0].hourly[].tempC' "$weatherreportjson" | sort -rn | head -1; } +gethightemp() { jq -r '.data.weather[0].hourly[].tempC' "$weatherreportjson" | sort -rn | head -1; } gethumidity() { humidity=$(get_nearest_hourly | jq -r '.humidity') |
