New backup 2024-04-24 14:15:02

This commit is contained in:
Penelope Gwen 2024-04-24 14:15:02 -06:00
parent 496b0e2142
commit 55ecd1fc03

View file

@ -7,11 +7,13 @@ current_f=$( jq -r '.current_condition.[].FeelsLikeF' <<< ${jweather} )
high_f=$( jq -r '.weather.[0].maxtempF' <<< ${jweather} )
low_f=$( jq -r '.weather.[0].mintempF' <<< ${jweather} )
weather_desc=$( jq -r '.current_condition.[].weatherDesc.[].value' <<< ${jweather} )
forecast=""
for d in {1..2};do
date -d $( jq -r --argjson d ${d} '.weather.[$d].date' <<< ${jweather} ) +'%A'
# date -d $( jq -r ".weather.[$d].date" <<< ${jweather} )
forecast="${forecast}\n"$( date -d $( jq -r --argjson d ${d} '.weather.[$d].date' <<< ${jweather} ) +'%a' )": High "$( jq -r --argjson d ${d} '.weather.[$d].maxtempF' <<< ${jweather} )"°F, Low"$( jq -r --argjson d ${d} '.weather.[$d].mintempF' <<< ${jweather} )"°F"
done
notify-send "Current: ${current_f}°F ${weather_desc}
forecast=$( echo -e $forecast ) # | sed '/^[[:space:]]*$/d' )
notify-send "${weather_desc}, ${current_f}°F
High: ${high_f}°F | Low: ${low_f}°F
${Forecast}"
${forecast}"