[PATCH] scripts: sxmo_weather.sh: fixed menu calls
Export this patch
Signed-off-by: hazardchem <hazardchem@disroot.org>
---
scripts/sxmo_weather.sh | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/scripts/sxmo_weather.sh b/scripts/sxmo_weather.sh
index 524136b..8b3bf47 100755
--- a/scripts/sxmo_weather.sh
+++ b/scripts/sxmo_weather.sh
@@ -17,13 +17,13 @@ WEATHERMENU() {
)" |
grep -vE '^#' |
sed "s/\t/: /g" |
- sxmo_dmenu_with_kb.sh -i -c -l 10 -p "Locations"
+ sxmo_dmenu.sh -i -l 10 -p "Locations"
)" || exit 0
if [ "$CHOICE" = "Close Menu" ]; then
exit 0
else
OUTPUT="$(echo "Close Menu" | sed 's/$/\nRight Now\nForecast/' | sxmo_dmenu.sh -i -l 10 )" || exit 0
- if [ "$CHOICE" = "Current Location" ]; then
+ if [ "$OUTPUT" = "Current Location" ]; then
PLACE=""
else
PLACE="$(echo "$CHOICE" | cut -d ',' -f 1 | sed s'/ /+/g')"
@@ -37,7 +37,11 @@ WEATHERMENU() {
notify-send "$WEATHER"
;;
"Forecast")
- sxmo_terminal.sh -f "monospace:size=5" sh -c "curl http://wttr.in/$PLACR | less -SR"
+ if [ "$SXMO_TERMINAL" = "alacritty" ]; then
+ sxmo_terminal.sh sh -c "curl http://wttr.in/$PLACE | less -SR"
+ else
+ sxmo_terminal.sh -f "monospace:size=5" sh -c "curl http://wttr.in/$PLACE | less -SR"
+ fi
;;
esac
fi
--
2.45.1
Thanks!
To git@git.sr.ht:~anjan/sxmo-userscripts
1c03b72..e3a1e90 master -> master