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