#!/bin/sh printhelp () { printf "hyprswap.sh: swap two one window columns in hyprscrolling\n" printf "\t-l) swap focused column to the left\n" printf "\t-r) swap focused column to the right\n" exit 1 } while getopts "lr" o; do case "${o}" in l) DIR='l' ;; r) DIR='r' ;; *) printhelp ;; 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