From 1145abb0149f74a4507043078d5866645f5891af Mon Sep 17 00:00:00 2001 From: Maarten van Gompel Date: Sun, 21 Mar 2021 20:53:22 +0100 Subject: [PATCH] use 2-finger swipe down to close window, 3 to kill window --- scripts/core/sxmo_gesturehandler.sh | 3 +++ scripts/core/sxmo_killwindow.sh | 6 +++++- scripts/core/sxmo_lisgdstart.sh | 3 ++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/scripts/core/sxmo_gesturehandler.sh b/scripts/core/sxmo_gesturehandler.sh index 19784ab..0a80c91 100755 --- a/scripts/core/sxmo_gesturehandler.sh +++ b/scripts/core/sxmo_gesturehandler.sh @@ -89,6 +89,9 @@ if [ "$HANDLE" -ne 0 ]; then "hidemenu") pkill -9 dmenu ;; + "closewindow") + sxmo_killwindow.sh close + ;; "killwindow") sxmo_killwindow.sh ;; diff --git a/scripts/core/sxmo_killwindow.sh b/scripts/core/sxmo_killwindow.sh index f55a076..ae08be2 100755 --- a/scripts/core/sxmo_killwindow.sh +++ b/scripts/core/sxmo_killwindow.sh @@ -4,4 +4,8 @@ # shellcheck source=scripts/core/sxmo_common.sh . "$(dirname "$0")/sxmo_common.sh" -xdotool windowkill "$(xdotool getactivewindow)" +if [ "$1" = "close" ]; then + xdotool windowclose "$(xdotool getactivewindow)" +else + xdotool windowkill "$(xdotool getactivewindow)" +fi diff --git a/scripts/core/sxmo_lisgdstart.sh b/scripts/core/sxmo_lisgdstart.sh index d90d133..266acd2 100755 --- a/scripts/core/sxmo_lisgdstart.sh +++ b/scripts/core/sxmo_lisgdstart.sh @@ -32,7 +32,8 @@ else -g "1,UD,T,*,sxmo_gesturehandler.sh showmenu" \ -g "1,DU,T,*,sxmo_gesturehandler.sh hidemenu" \ -g "2,UD,T,*,sxmo_gesturehandler.sh showsysmenu" \ - -g "2,UD,B,*,sxmo_gesturehandler.sh killwindow" \ + -g "2,UD,B,*,sxmo_gesturehandler.sh closewindow" \ + -g "3,UD,B,*,sxmo_gesturehandler.sh killwindow" \ -g '2,RL,*,*,sxmo_gesturehandler.sh moveprevdesktop' \ -g '2,LR,*,*,sxmo_gesturehandler.sh movenextdesktop' \ -g '1,DU,R,L,sxmo_gesturehandler.sh scrollup_long' \