From 2e6ce5c8105beaf26237a9f60ddb6b4eb3d09ade Mon Sep 17 00:00:00 2001 From: Stacy Harper Date: Wed, 1 Sep 2021 18:33:59 +0200 Subject: [PATCH] Fix layout dwm regression Signed-off-by: Stacy Harper Signed-off-by: Maarten van Gompel --- scripts/core/sxmo_inputhandler.sh | 4 ++-- scripts/core/sxmo_wm.sh | 16 ++++++++++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/scripts/core/sxmo_inputhandler.sh b/scripts/core/sxmo_inputhandler.sh index 5a0bc2c..0bb417c 100755 --- a/scripts/core/sxmo_inputhandler.sh +++ b/scripts/core/sxmo_inputhandler.sh @@ -176,11 +176,11 @@ case "$ACTION" in exit 0 ;; "voldown_one") - swaymsg layout toggle splith splitv tabbed + sxmo_wm.sh togglelayout exit ;; "voldown_two") - swaymsg focus tiling + sxmo_wm.sh switchfocus exit ;; "voldown_three") diff --git a/scripts/core/sxmo_wm.sh b/scripts/core/sxmo_wm.sh index 6e99396..b443ded 100644 --- a/scripts/core/sxmo_wm.sh +++ b/scripts/core/sxmo_wm.sh @@ -118,6 +118,22 @@ xorgexecwait() { exec "$@" } +swaytogglelayout() { + swaymsg layout toggle splith splitv tabbed +} + +xorgtogglelayout() { + xdotool key --clearmodifiers key Super+space +} + +swayswitchfocus() { + swaymsg focus tiling +} + +xorgswitchfocus() { + xdotool key --clearmodifiers Super+x +} + guesswm() { if [ -n "$SWAYSOCK" ]; then printf "sway"