[hackers] [PATCH sxmo-utils] use 2-finger swipe down to close window, 3 to kill window

From: Maarten van Gompel <proycon_AT_anaproy.nl>
Date: Sun, 21 Mar 2021 21:09:01 +0100

---
 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
_AT_@ -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
_AT_@ -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
_AT_@ -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' \
--
2.30.2
Received on Sun Mar 21 2021 - 21:09:01 CET

This archive was generated by hypermail 2.3.0 : Sun Mar 21 2021 - 21:12:32 CET