From 1994547bb7da4c09fbfe05adec45c5bea32af758 Mon Sep 17 00:00:00 2001 From: ZachIR Date: Thu, 31 Jul 2025 09:58:42 -0500 Subject: Add hypr script to swap two windows horizontally --- hyprswap.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 hyprswap.sh 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 -- cgit v1.2.3