From cc8dc37015ba0f9d360bc2ebee51c31e2e1aa8b9 Mon Sep 17 00:00:00 2001 From: Stacy Harper Date: Fri, 26 Mar 2021 20:02:01 +0100 Subject: [PATCH] Add a weechat appmenu Signed-off-by: Stacy Harper Signed-off-by: Maarten van Gompel --- scripts/core/sxmo_appmenu.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/scripts/core/sxmo_appmenu.sh b/scripts/core/sxmo_appmenu.sh index 79e4feb..2240517 100755 --- a/scripts/core/sxmo_appmenu.sh +++ b/scripts/core/sxmo_appmenu.sh @@ -289,6 +289,15 @@ programchoicesinit() { $icon_mnu St menu ^ 0 ^ sxmo_appmenu.sh st-256color " WINNAME=ncmpcpp + elif echo "$WMNAME" | grep -i -w "weechat"; then + #weechat + CHOICES=" + $icon_msg Hotlist Next ^ 1 ^ key Alt+a + $icon_arl History Previous ^ 1 ^ key Alt+Shift+comma + $icon_arr History Next ^ 1 ^ key Alt+Shift+period + $icon_trm Buffer ^ 0 ^ type '/buffer ' + " + WINNAME=weechat else STSELMODEON="$( echo "$XPROPOUT" | grep -E '^_ST_SELMODE.+=' | cut -d= -f2 | tr -d ' ' @@ -450,6 +459,16 @@ key() { #--window $WIN } +type() { + xdotool windowactivate "$WIN" + xdotool type --delay 50 --clearmodifiers "$@" +} + +typeenter() { + type "$@" + xdotool key Return +} + quit() { exit 0 }