Cross-monitor window swap for SUPER+SHIFT+LEFT/RIGHT #9711
Niijen
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I wanted
SUPER+SHIFT+LEFT/RIGHTto "cut through" to the next monitor when pressed repeatedly at the tiling edge, instead of only being able to jump monitors viaSUPER+SHIFT+ALT+LEFT/RIGHT(moves the whole workspace) orSUPER+SHIFT+1,2,3....So: normal swap behavior stays exactly the same, but when there's no window left to swap with in that direction, the active window (and focus) now moves onto the active workspace of the adjacent monitor — like dragging a window across displays on macOS.
Wrote it up as a small script +
bindings.luasnippet here, MIT licensed:https://github.com/Niijen/omarchy-cross-monitor-swap
It works by trying the normal
hl.dsp.window.swapdispatch first, and only falling back tohl.dsp.window.move({ monitor = dir })when Hyprland doesn't report a cleanok(i.e. nothing to swap with) — no polling or geometry guessing needed.Sharing in case it's useful to others with multi-monitor setups, or worth considering as the default
SUPER+SHIFT+arrowbehavior.All reactions