~mil/sxmo-devel

sxmo-utils: Acme: add controls and selection options v1 SUPERSEDED

hazardchem: 1
 Acme: add controls and selection options

 3 files changed, 26 insertions(+), 0 deletions(-)
#1199654 test.yml success
Yeah these buttons have specific uses and this was set up so that the cursor
could be set back to where it needs to be as touchibg the menu moves the mouse
Next
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~mil/sxmo-devel/patches/51141/mbox | git am -3
Learn more about email & git

[PATCH sxmo-utils] Acme: add controls and selection options Export this patch

As acme is a mouse heavy program it needs input from middle and right clicks.
As such this requires xdotool to simulate mouse button clicks.

To make it work I have bound volume up to right click and volume down to middle
click.

There is also options in context menu as backup if the device doesn't have volume
controls.

If the mouse 2 and 3 aren't clear they require you to reselect the spot in less
than 2 seconds for the mouse click to occur at that location.

Signed-off-by: hazardchem <hazardchem@disroot.org>
---
 configs/default_hooks/sxmo_hook_apps.sh         |  1 +
 configs/default_hooks/sxmo_hook_contextmenu.sh  | 13 +++++++++++++
 configs/default_hooks/sxmo_hook_inputhandler.sh | 12 ++++++++++++
 3 files changed, 26 insertions(+)

diff --git a/configs/default_hooks/sxmo_hook_apps.sh b/configs/default_hooks/sxmo_hook_apps.sh
index ed3834d..43acd2b 100755
--- a/configs/default_hooks/sxmo_hook_apps.sh
+++ b/configs/default_hooks/sxmo_hook_apps.sh
@@ -22,6 +22,7 @@ write_line_app() {

write_line_app gnome-2048 "$icon_gam 2048" "gnome-2048"
write_line_app jami-qt "$icon_msg Jami" "jami-qt"
write_line_app acme "$icon_edt Acme" "acme -c 1 -f /usr/lib/plan9/font/pelm/ascii.16.font"
write_line_app aerc "$icon_eml Aerc" "sxmo_terminal.sh aerc"
write_line_app alacritty "icon_trm Alacritty" "alacritty"
write_line_app amberol "$icon_mus Amberol" "amberol $XDG_MUSIC_DIR"
diff --git a/configs/default_hooks/sxmo_hook_contextmenu.sh b/configs/default_hooks/sxmo_hook_contextmenu.sh
index 5d23054..2675863 100755
--- a/configs/default_hooks/sxmo_hook_contextmenu.sh
+++ b/configs/default_hooks/sxmo_hook_contextmenu.sh
@@ -725,6 +725,19 @@ case "$WMCLASS" in
		"
		WINNAME=Badwolf
		;;
	*acme*)
		# Acme
		CHOICES="
			$icon_mse 2 (2s delay to select)  ^ 0 ^ sleep 2 && xdotool click 3
			$icon_mse 3 (2s delay to select)  ^ 0 ^ sleep 2 && xdotool click 2
			$icon_itm Autocomplete            ^ 0 ^ sxmo_type.sh -M Ctrl -k f
			$icon_exp Select Last Typed Text  ^ 0 ^ sxmo_type.sh -M Escape
			$icon_del Delete To Start Of Line       ^ 0 ^ sxmo_type.sh -M Ctrl -k U
			$icon_arl Move To Start Of Line   ^ 0 ^ sxmo_type.sh -M Ctrl -k A
			$icon_arr Move To End Of Line      ^ 0 ^ sxmo_type.sh -M Ctrl -k E
		"
		WINNAME=Acme
		;;
	*)
		# Default system menu (no matches)
		CHOICES="
diff --git a/configs/default_hooks/sxmo_hook_inputhandler.sh b/configs/default_hooks/sxmo_hook_inputhandler.sh
index 848fecf..b0bba6d 100755
--- a/configs/default_hooks/sxmo_hook_inputhandler.sh
+++ b/configs/default_hooks/sxmo_hook_inputhandler.sh
@@ -97,6 +97,18 @@ case "$WMCLASS" in
				;;
		esac
		;;
	*"acme"*)
		case "$ACTION" in
			"volup_one")
				xdotool click 3
				exit 0
				;;
			"voldown_one")
				xdotool click 2
				exit 0
				;;
		esac
		;;
	*"foot"*|*"st"*|*"vte"*|"terminal") # Terminals
		case "$WMCLASS" in # Handle programs without touch support
			*"st"*)
-- 
2.44.0
Superseded by https://lists.sr.ht/~mil/sxmo-devel/patches/51434
Marked as superseded !
sxmo-utils/patches/test.yml: SUCCESS in 21s

[Acme: add controls and selection options][0] from [hazardchem][1]

[0]: https://lists.sr.ht/~mil/sxmo-devel/patches/51141
[1]: mailto:hazardchem@disroot.org

✓ #1199654 SUCCESS sxmo-utils/patches/test.yml https://builds.sr.ht/~mil/job/1199654