Add script to swap Hyprland workspaces across monitors

This introduces xmonad like workspace swapping, i.e. if the workspaces
is already focused on another monitor, a swap will occur, moving the
workspace from the other monitor to the currently focused monitor and
replacing it with the workspace originally focused on this monitor (i.e.
swapping them).

If we're only using 1 monitor, or the workspace isn't focused on any
monitor, this will behave exactly like regular workspace focus command.
This commit is contained in:
ItsDrike 2024-06-10 14:13:39 +02:00
parent 54f1c40d61
commit 9d15387d5e
Signed by: ItsDrike
GPG key ID: FA2745890B7048C0
6 changed files with 38 additions and 15 deletions

View file

@ -102,7 +102,15 @@
#
# Switch workspace (swapping to current monitor)
#
# TODO: requires script (swap-workspace)
"SUPER, 1, exec, hyprland-swap-workspace 1"
"SUPER, 2, exec, hyprland-swap-workspace 2"
"SUPER, 3, exec, hyprland-swap-workspace 3"
"SUPER, 4, exec, hyprland-swap-workspace 4"
"SUPER, 5, exec, hyprland-swap-workspace 5"
"SUPER, 6, exec, hyprland-swap-workspace 6"
"SUPER, 7, exec, hyprland-swap-workspace 7"
"SUPER, 8, exec, hyprland-swap-workspace 8"
"SUPER, 9, exec, hyprland-swap-workspace 9"
#
# Move window to workspace