From 8dc0b9ca451e75d985794f1c5ad3100061cc6e21 Mon Sep 17 00:00:00 2001 From: Maarten van Gompel Date: Sat, 31 Oct 2020 23:01:23 +0100 Subject: [PATCH] Implemented suggested fix for Notifications menu fails with special characters (#78) --- scripts/notifications/sxmo_notificationsmenu.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/notifications/sxmo_notificationsmenu.sh b/scripts/notifications/sxmo_notificationsmenu.sh index 19472c4..f635632 100755 --- a/scripts/notifications/sxmo_notificationsmenu.sh +++ b/scripts/notifications/sxmo_notificationsmenu.sh @@ -17,14 +17,14 @@ notificationmenu() { xargs -0 echo | sed '/^[[:space:]]*$/d' | awk '{$1=$1};1' | - cut -d^ -f1 | + cut -d^ -f1 | dmenu -c -i -fn "Terminus-18" -p "Notifs" -l 10 )" [ "$PICKEDCONTENT" = "Close Menu" ] && exit 1 [ "$PICKEDCONTENT" = "Clear Notifications" ] && rm "$NOTIFDIR"/* && exit 1 - PICKEDNOTIFFILE="$(echo "$CHOICES" | awk '{$1=$1};1' | grep "$PICKEDCONTENT" | cut -d^ -f2 | tr -d ' ')" + PICKEDNOTIFFILE="$(echo "$CHOICES" | tr -s ' ' | grep -F "$PICKEDCONTENT" | cut -d^ -f2 | tr -d ' ')" NOTIFACTION="$(head -n1 "$PICKEDNOTIFFILE")" setsid -f sh -c "$NOTIFACTION" & rm "$PICKEDNOTIFFILE"