From 99d226929bf68ed651936ea5a95a8ee492d5926f Mon Sep 17 00:00:00 2001 From: Stacy Harper Date: Wed, 7 Jul 2021 21:21:03 +0200 Subject: [PATCH] Prefix one finger gesture with "one" This make input handling matching more consistent. Take this example : You want to bind one finger left gesture to something with all the distance (short, medium and long) so you now can match *"oneleft" to match "longoneleft", "mediumoneleft", "oneleft". Without the "one" you would use *"left" which also match "twoleft" and this override the "move to another workspace gesture. Signed-off-by: Stacy Harper Signed-off-by: Maarten van Gompel --- configs/default_hooks/lisgdstart | 16 ++++++++++++---- scripts/core/sxmo_inputhandler.sh | 12 ++++++------ 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/configs/default_hooks/lisgdstart b/configs/default_hooks/lisgdstart index 06e665d..12c15de 100644 --- a/configs/default_hooks/lisgdstart +++ b/configs/default_hooks/lisgdstart @@ -39,10 +39,18 @@ lisgd "$@" -t "$LISGD_THRESHOLD" -T "$LISGD_THRESHOLD_PRESSED" \ -g '1,UD,R,*,P,sxmo_inputhandler.sh downrightcorner' \ -g '1,LR,R,S,sxmo_inputhandler.sh rightrightcorner_short' \ -g '1,RL,L,S,sxmo_inputhandler.sh leftrightcorner_short' \ - -g '1,RL,*,*,sxmo_inputhandler.sh left' \ - -g '1,LR,*,*,sxmo_inputhandler.sh right' \ - -g '1,DU,*,*,sxmo_inputhandler.sh up' \ - -g '1,UD,*,*,sxmo_inputhandler.sh down' \ + -g '1,RL,*,L,sxmo_inputhandler.sh longoneleft' \ + -g '1,LR,*,L,sxmo_inputhandler.sh longoneright' \ + -g '1,DU,*,L,sxmo_inputhandler.sh longoneup' \ + -g '1,UD,*,L,sxmo_inputhandler.sh longonedown' \ + -g '1,RL,*,M,sxmo_inputhandler.sh mediumoneleft' \ + -g '1,LR,*,M,sxmo_inputhandler.sh mediumoneright' \ + -g '1,DU,*,M,sxmo_inputhandler.sh mediumoneup' \ + -g '1,UD,*,M,sxmo_inputhandler.sh mediumonedown' \ + -g '1,RL,*,*,sxmo_inputhandler.sh oneleft' \ + -g '1,LR,*,*,sxmo_inputhandler.sh oneright' \ + -g '1,DU,*,*,sxmo_inputhandler.sh oneup' \ + -g '1,UD,*,*,sxmo_inputhandler.sh onedown' \ -g '1,DRUL,*,*,sxmo_inputhandler.sh upleft' \ -g '1,URDL,*,*,sxmo_inputhandler.sh downleft' \ -g '1,DLUR,*,*,sxmo_inputhandler.sh upright' \ diff --git a/scripts/core/sxmo_inputhandler.sh b/scripts/core/sxmo_inputhandler.sh index 8fc6b30..37737d9 100755 --- a/scripts/core/sxmo_inputhandler.sh +++ b/scripts/core/sxmo_inputhandler.sh @@ -95,11 +95,11 @@ case "$WMCLASS" in type d exit 0 ;; - "left") + *"oneleft") typeenter ":n" exit 0 ;; - "right") + *"oneright") typeenter ":p" exit 0 ;; @@ -115,15 +115,15 @@ case "$WMCLASS" in key Shift+Tab exit 0 ;; - "down") + *"onedown") key d exit 0 ;; - "up") + *"oneup") key u exit 0 ;; - "right") + *"oneright") key Return exit 0 ;; @@ -131,7 +131,7 @@ case "$WMCLASS" in key Ctrl+t exit 0 ;; - "left") + *"oneleft") key b exit 0 ;;