From 7fe317c71b8b4dd11dc42427b2d9a27f432dba4e Mon Sep 17 00:00:00 2001 From: Stacy Harper Date: Sun, 9 May 2021 19:19:02 +0200 Subject: [PATCH] Also give WMNAME to user inputhandlers to handle terminals Signed-off-by: Stacy Harper Signed-off-by: Anjandev Momi --- scripts/core/sxmo_inputhandler.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/core/sxmo_inputhandler.sh b/scripts/core/sxmo_inputhandler.sh index 8a6e5de..aa66088 100755 --- a/scripts/core/sxmo_inputhandler.sh +++ b/scripts/core/sxmo_inputhandler.sh @@ -11,11 +11,12 @@ ACTION="$1" XPROPOUT="$(xprop -id "$(xdotool getactivewindow)")" WMCLASS="$(echo "$XPROPOUT" | grep WM_CLASS | cut -d ' ' -f3-)" +WMNAME=$(echo "$XPROPOUT" | grep -E "^WM_NAME" | cut -d ' ' -f3-) HANDLE=1 if [ -x "$XDG_CONFIG_HOME"/sxmo/hooks/inputhandler ]; then #hook script must exit with a zero exit code ONLY if it has handled the gesture! - "$XDG_CONFIG_HOME"/sxmo/hooks/inputhandler "$WMCLASS" "$@" + "$XDG_CONFIG_HOME"/sxmo/hooks/inputhandler "$WMCLASS" "$WMNAME" "$@" HANDLE=$? fi @@ -30,7 +31,6 @@ if [ "$HANDLE" -ne 0 ]; then ;; "st-256color") # First we try to handle the app running inside st: - WMNAME=$(echo "$XPROPOUT" | grep -E "^WM_NAME" | cut -d ' ' -f3-) if echo "$WMNAME" | grep -i -w tuir; then if [ "$ACTION" = "enter" ]; then xdotool key o