diff options
author | ZachIR <zachir@librem.one> | 2025-07-31 09:58:42 -0500 |
---|---|---|
committer | ZachIR <zachir@librem.one> | 2025-07-31 09:58:42 -0500 |
commit | 1994547bb7da4c09fbfe05adec45c5bea32af758 (patch) | |
tree | 01768b635188e45e59211b451a74d7f2a72790b4 /hyprswap.sh | |
parent | 31860e9bf13ad942b82627dfd77be4c4d8bab6fb (diff) |
Add hypr script to swap two windows horizontally
Diffstat (limited to 'hyprswap.sh')
-rwxr-xr-x | hyprswap.sh | 20 |
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 |