summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xhyprswap.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/hyprswap.sh b/hyprswap.sh
new file mode 100755
index 0000000..b9d48b2
--- /dev/null
+++ b/hyprswap.sh
@@ -0,0 +1,20 @@
+#!/bin/sh
+while getopts "lr" o; do case "${o}" in
+ l) DIR='l' ;;
+ r) DIR='r' ;;
+esac done
+
+case "$DIR" in
+ 'l')
+ hyprctl dispatch layoutmsg movewindowto 'l'
+ hyprctl dispatch layoutmsg focus 'd'
+ hyprctl dispatch layoutmsg promote
+ hyprctl dispatch layoutmsg focus 'l'
+ ;;
+ 'r')
+ hyprctl dispatch layoutmsg movewindowto 'r'
+ hyprctl dispatch layoutmsg promote
+ hyprctl dispatch layoutmsg focus 'l'
+ hyprctl dispatch layoutmsg focus 'r'
+ ;;
+esac