From 6be3499f5d2159f59bb6af6dfd9d19a001350cc6 Mon Sep 17 00:00:00 2001 From: Penelope Gwen Date: Wed, 24 Apr 2024 13:15:02 -0600 Subject: [PATCH] New backup 2024-04-24 13:15:02 --- .../.config/sway/scripts/global_shortcuts/weather | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 de/home/.config/sway/scripts/global_shortcuts/weather diff --git a/de/home/.config/sway/scripts/global_shortcuts/weather b/de/home/.config/sway/scripts/global_shortcuts/weather new file mode 100755 index 0000000..857c0cc --- /dev/null +++ b/de/home/.config/sway/scripts/global_shortcuts/weather @@ -0,0 +1,13 @@ +#!/bin/bash + +jweather=$( curl wttr.in/?format=j1 ) + +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} ) + +notify-send "${current_f}°F ${weather_desc} +High: ${high_f} +Low: ${low_f} +"