From 62cd19357d083411c6e38bf2c8b60596eee7296d Mon Sep 17 00:00:00 2001 From: Steve Beaulac Date: Mon, 22 Jun 2026 15:18:33 -0400 Subject: [PATCH] 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 --- config/hypr/hyprland.lua | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/config/hypr/hyprland.lua b/config/hypr/hyprland.lua index b0735ea..1355880 100644 --- a/config/hypr/hyprland.lua +++ b/config/hypr/hyprland.lua @@ -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({ 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 + 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 .. "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")) end, { description = "Layout: Cycle next" }) 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")) end, { description = "Layout: Cycle previous" })