Add a bemenu control mode to access bemenu control with buttons
Signed-off-by: Stacy Harper <contact@stacyharper.net> Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
This commit is contained in:
parent
d430cce8ff
commit
f86cc46d03
6 changed files with 77 additions and 2 deletions
|
@ -28,7 +28,11 @@ esac > /dev/null
|
|||
|
||||
case "$(sxmo_wm.sh)" in
|
||||
sway)
|
||||
exec bemenu --scrollbar autohide -s -n -w -c -l "$(sxmo_rotate.sh isrotated > /dev/null && printf 8 || printf 15)" "$@"
|
||||
swaymsg mode menu -q # disable default button inputs
|
||||
bemenu --scrollbar autohide -s -n -w -c -l "$(sxmo_rotate.sh isrotated > /dev/null && printf 8 || printf 15)" "$@"
|
||||
returned=$?
|
||||
swaymsg mode default -q
|
||||
exit "$returned"
|
||||
;;
|
||||
xorg|dwm)
|
||||
if sxmo_keyboard.sh isopen; then
|
||||
|
|
|
@ -289,7 +289,7 @@ case "$ACTION" in
|
|||
exit 0
|
||||
;;
|
||||
"bottomleftcorner")
|
||||
lock_screen
|
||||
sxmo_dmenu.sh close && lock_screen
|
||||
exit 0
|
||||
;;
|
||||
"bottomrightcorner")
|
||||
|
|
20
scripts/core/sxmo_menumode_toggler.sh
Normal file
20
scripts/core/sxmo_menumode_toggler.sh
Normal file
|
@ -0,0 +1,20 @@
|
|||
#!/bin/sh
|
||||
|
||||
inputs="
|
||||
1:1:1c21800.lradc
|
||||
0:0:axp20x-pek
|
||||
"
|
||||
|
||||
setup_xkb() {
|
||||
for input in $inputs; do
|
||||
swaymsg input "$input" xkb_file "$1"
|
||||
done
|
||||
}
|
||||
|
||||
swaymsg -t subscribe -m "['mode']" | while read -r message; do
|
||||
if printf %s "$message" | grep -q menu; then
|
||||
setup_xkb /usr/share/sxmo/sway/xkb_mobile_movement_buttons
|
||||
else
|
||||
setup_xkb /usr/share/sxmo/sway/xkb_mobile_normal_buttons
|
||||
fi
|
||||
done
|
Loading…
Add table
Add a link
Reference in a new issue