fix(hypr): update window swap and layout cycle keybindings

- Replace window swap bindings with layout cycle dispatch operations
- Swap cycle directions for period/comma keys and add swapwithmaster
- Wrap swap keybindings in dispatch functions for proper execution
This commit is contained in:
2026-06-22 15:18:33 -04:00
parent 458cc31e6c
commit 62cd19357d
+11 -4
View File
@@ -402,8 +402,13 @@ hl.bind(LEADER .. "J", hl.dsp.focus({ direction = "d" }), { description = "Windo
-- hl.bind(LEADER .. "z", hl.dsp.focus({ last = true }), { description = "Window: Focus last" }) -- hl.bind(LEADER .. "z", hl.dsp.focus({ last = true }), { description = "Window: Focus last" })
hl.bind(LEADER .. "Z", hl.dsp.focus({ urgent_or_last = true }), { description = "Window: Focus last" }) hl.bind(LEADER .. "Z", hl.dsp.focus({ urgent_or_last = true }), { description = "Window: Focus last" })
hl.bind(LEADER .. "ALT + period", hl.dsp.window.swap({ next = true }), { description = "Window: Swap with next" })
hl.bind(LEADER .. "ALT + comma", hl.dsp.window.swap({ prev = true }), { description = "Window: Swap with prev" }) hl.bind(LEADER .. "ALT + period", function()
hl.dispatch(hl.dsp.layout("cycleprev"))
end, { description = "Window: Swap with next" })
hl.bind(LEADER .. "ALT + comma", function()
hl.dispatch(hl.dsp.layout("cyclenext"))
end, { description = "Window: Swap with prev" })
hl.bind("ALT + Tab", hl.dsp.window.cycle_next(), { description = "Window: Cycle next" }) hl.bind("ALT + Tab", hl.dsp.window.cycle_next(), { description = "Window: Cycle next" })
hl.bind("ALT + SHIFT + Tab", hl.dsp.window.cycle_next({ next = false }), { description = "Window: Cycle prev" }) hl.bind("ALT + SHIFT + Tab", hl.dsp.window.cycle_next({ next = false }), { description = "Window: Cycle prev" })
@@ -419,12 +424,14 @@ hl.bind(LEADER .. "M", hl.dsp.layout("swapwithmaster"))
-- hl.bind(LEADER .. "M", hl.dsp.layout("rollnext")) -- hl.bind(LEADER .. "M", hl.dsp.layout("rollnext"))
hl.bind(LEADER .. "period", function() hl.bind(LEADER .. "period", function()
hl.dispatch(hl.dsp.layout("cyclenext")) hl.dispatch(hl.dsp.layout("cycleprev"))
hl.dispatch(hl.dsp.layout("swapwithmaster"))
-- hl.dispatch(hl.dsp.layout("focus r")) -- hl.dispatch(hl.dsp.layout("focus r"))
end, { description = "Layout: Cycle next" }) end, { description = "Layout: Cycle next" })
hl.bind(LEADER .. "comma", function() hl.bind(LEADER .. "comma", function()
hl.dispatch(hl.dsp.layout("cycleprev")) hl.dispatch(hl.dsp.layout("cyclenext"))
hl.dispatch(hl.dsp.layout("swapwithmaster"))
-- hl.dispatch(hl.dsp.layout("focus l")) -- hl.dispatch(hl.dsp.layout("focus l"))
end, { description = "Layout: Cycle previous" }) end, { description = "Layout: Cycle previous" })