diff options
author | awy <awy@awy.one> | 2025-01-27 17:25:54 +0300 |
---|---|---|
committer | awy <awy@awy.one> | 2025-01-27 17:25:54 +0300 |
commit | ec91620004d6b24024fec856192683184d3e5b3a (patch) | |
tree | 48c7ed6279718510a06899984a472cc54a38bd2c /.local/bin/statusbar/sb-forecast | |
parent | 06142cca59919fbdd5ceb70afc32497cfe4a13b0 (diff) |
update
Diffstat (limited to '.local/bin/statusbar/sb-forecast')
-rwxr-xr-x | .local/bin/statusbar/sb-forecast | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/.local/bin/statusbar/sb-forecast b/.local/bin/statusbar/sb-forecast index 699c868..ef66ba2 100755 --- a/.local/bin/statusbar/sb-forecast +++ b/.local/bin/statusbar/sb-forecast @@ -2,6 +2,7 @@ # Displays today's precipication chance (ā), and daily low (š„¶) and high (š). # Usually intended for the statusbar. + LOCATION="Moscow" url="${WTTRURL:-wttr.in}" weatherreport="${XDG_CACHE_HOME:-$HOME/.cache}/weatherreport" @@ -34,24 +35,20 @@ readfile() { weatherdata="$(cat "$weatherreport")" ;} showweather() { readfile - printf "ā%s š„¶%sĀ° š%sĀ°\n" "$(getprecipchance)" $(getdailyhighlow) -} - -openterm() { - hyprctl dispatch exec "[float; size 1800 1300;]" '$TERMINAL -e sh -c "curl wttr.in/Moscow; read _"' + printf "ļ© %s ļ %sĀ° ļ
%sĀ°\n" "$(getprecipchance)" $(getdailyhighlow) } case $1 in - 1) hyprctl dispatch exec "[float; size 1800 1100;]" "$TERMINAL -e less -Sfr \"$weatherreport\"" - ;; - 2) getforecast && showweather ;; - 3) notify-send "š Weather module" "\- Left click for full forecast. + 1) setsid -f "$TERMINAL" -e less -Sfr "$weatherreport" ;; + 2) getforecast && showweather ;; + 3) notify-send "ļ Weather module" "\- Left click for full forecast. - Middle click to update forecast. -ā: Chance of rain/snow -š„¶: Daily low -š: Daily high" ;; - 6) hyprctl dispatch exec "$TERMINAL -e \"$EDITOR\" \"$0\"" ;; +ļ© : Chance of rain/snow +ļ : Daily low +ļ
: Daily high" ;; + 6) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;; esac checkforecast || getforecast + showweather |