From 31b04e3b3c091860d243137db876f4bc17eb2fae Mon Sep 17 00:00:00 2001 From: Penelope Gwen Date: Wed, 24 Apr 2024 13:45:02 -0600 Subject: [PATCH] New backup 2024-04-24 13:45:02 --- de/home/.config/sway/scripts/global_shortcuts.sh | 2 +- .../.config/sway/scripts/global_shortcuts/weather | 13 ++++++++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/de/home/.config/sway/scripts/global_shortcuts.sh b/de/home/.config/sway/scripts/global_shortcuts.sh index a454365..4299f28 100755 --- a/de/home/.config/sway/scripts/global_shortcuts.sh +++ b/de/home/.config/sway/scripts/global_shortcuts.sh @@ -10,4 +10,4 @@ options=$( ls "$HOME/.config/sway/scripts/global_shortcuts/" ) op=$( echo -e "${options}" | wofi -i --dmenu | awk '{print}' ) -"$HOME/.config/sway/scripts/shortcuts/${current_ws}"/"${op}" +"$HOME/.config/sway/scripts/global_shortcuts/${op}" diff --git a/de/home/.config/sway/scripts/global_shortcuts/weather b/de/home/.config/sway/scripts/global_shortcuts/weather index 3ee2557..aa9faf7 100755 --- a/de/home/.config/sway/scripts/global_shortcuts/weather +++ b/de/home/.config/sway/scripts/global_shortcuts/weather @@ -1,13 +1,16 @@ #!/bin/bash -jweather=$( curl --silent wttr.in/?format=j1 ) +#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} ) low_f=$( jq -r '.weather.[0].mintempF' <<< ${jweather} ) weather_desc=$( jq -r '.current_condition.[].weatherDesc.[].value' <<< ${jweather} ) +for d in 1..5;do + date -d $( jq -r ".weather.[$d].date" <<< ${jweather} ) +'%A' +done -notify-send "${current_f}°F ${weather_desc} -High: ${high_f} -Low: ${low_f} -" +notify-send "Current: ${current_f}°F ${weather_desc} +High: ${high_f}°F | Low: ${low_f}°F +${Forecast}"