aboutsummaryrefslogtreecommitdiff
path: root/.local/bin/statusbar/sb-forecast
diff options
context:
space:
mode:
Diffstat (limited to '.local/bin/statusbar/sb-forecast')
-rwxr-xr-x.local/bin/statusbar/sb-forecast23
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