From c7f2603a1937b75d4faeac55776e3af1f0d21dcf Mon Sep 17 00:00:00 2001 From: Penelope Gwen Date: Wed, 1 May 2024 20:00:02 -0600 Subject: [PATCH] New backup 2024-05-01 20:00:02 --- de/home/.config/sway-profiles/global-shortcuts/weather | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/de/home/.config/sway-profiles/global-shortcuts/weather b/de/home/.config/sway-profiles/global-shortcuts/weather index 894e4dc..ced14cb 100755 --- a/de/home/.config/sway-profiles/global-shortcuts/weather +++ b/de/home/.config/sway-profiles/global-shortcuts/weather @@ -1,7 +1,7 @@ #!/bin/bash -#jweather=$( curl --silent wttr.in/?format=j1 ) -jweather=$( cat ~/weather.json ) +jweather=$( curl --silent wttr.in/?format=j1 ) +#jweather=$( cat ~/weather.json ) current_f=$( jq -r '.current_condition.[].FeelsLikeF' <<< ${jweather} ) high_f=$( jq -r '.weather.[0].maxtempF' <<< ${jweather} ) @@ -17,7 +17,7 @@ for h in {0..7};do check_hour=$( date -d $( jq -r --argjson h ${h} '.weather.[0].hourly.[$h].time' <<< ${jweather} ) +'%H' ) if [[ ${check_hour#0} -ge ${current_hour#0} ]];then echo "future" - hourly_forecast="${hourly_forecast}\n${check_hour}: "$( jq -r --argjson h ${h} '.weather.[0].hourly.[$h].weatherDesc.[].value' <<< ${jweather} )", "$( jq -r --argjson h ${h} '.weather.[0].hourly.[$h].FeelsLikeF' <<< ${jweather} )"°F" + hourly_forecast="${hourly_forecast}\n${check_hour}00: "$( jq -r --argjson h ${h} '.weather.[0].hourly.[$h].weatherDesc.[].value' <<< ${jweather} )", "$( jq -r --argjson h ${h} '.weather.[0].hourly.[$h].FeelsLikeF' <<< ${jweather} )"°F" fi done