From 4a4bc5ad4e868ab8235aae32ee35823d34ec7799 Mon Sep 17 00:00:00 2001 From: awy Date: Tue, 27 Aug 2024 18:33:41 +0300 Subject: more convenient / original way --- .local/bin/statusbar/sb-forecast | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) (limited to '.local/bin/statusbar/sb-forecast') diff --git a/.local/bin/statusbar/sb-forecast b/.local/bin/statusbar/sb-forecast index 8b744c4..ebbdf58 100755 --- a/.local/bin/statusbar/sb-forecast +++ b/.local/bin/statusbar/sb-forecast @@ -32,25 +32,19 @@ showweather() { } openterm() { - hyprctl dispatch exec "[float; size 1800 1300;]" 'kitty -e sh -c "curl wttr.in; read _"' + hyprctl dispatch exec "[float; size 1800 1300;]" 'kitty -e sh -c "curl wttr.in/Moscow; read _"' } -sendnotif() { - notify-send "🌈 Weather module" "\- Left click for full forecast. +case $1 in + 1) hyprctl dispatch exec "[float; size 1800 1300;]" 'kitty -e sh -c "curl wttr.in/Moscow; read _"' + ;; + 3) notify-send "🌈 Weather module" "\- Left click for full forecast. - Middle click to update forecast. ☔: Chance of rain/snow 🥶: Daily low -🌞: Daily high" -} - -if [ ! -n "$1" ]; then - getforecast - showweather -else - if [ "$1" -eq 1 ]; then - openterm - elif [ "$1" -eq 3 ]; then - sendnotif - fi -fi +🌞: Daily high" ;; + 6) kitty -e "$EDITOR" "$0" ;; +esac +getforecast +showweather -- cgit v1.2.3