aboutsummaryrefslogtreecommitdiff
path: root/.local/bin/statusbar/sb-forecast
diff options
context:
space:
mode:
authorawy <awy@tutamail.com>2024-08-27 18:33:41 +0300
committerawy <awy@tutamail.com>2024-08-27 18:33:41 +0300
commit4a4bc5ad4e868ab8235aae32ee35823d34ec7799 (patch)
tree12a3777396a03bb9601e823e3e36db9af0c04684 /.local/bin/statusbar/sb-forecast
parent2c0341950bdee4f1aa8bdb6e71f64c73f84cdc80 (diff)
more convenient / original way
Diffstat (limited to '.local/bin/statusbar/sb-forecast')
-rwxr-xr-x.local/bin/statusbar/sb-forecast26
1 files changed, 10 insertions, 16 deletions
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