Also give WMNAME to user inputhandlers to handle terminals

Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Anjandev Momi <anjan@momi.ca>
master
Stacy Harper 3 years ago committed by Anjandev Momi
parent c81940a74e
commit 7fe317c71b
  1. 4
      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

Loading…
Cancel
Save