From 292bb58b18342b66758506a3cea32ddf60df4510 Mon Sep 17 00:00:00 2001 From: Steve Beaulac Date: Fri, 9 Oct 2026 01:15:04 -0400 Subject: [PATCH] fix(hyprland): use active workspace layout --- desktop/config/hypr/sjb/bindings.lua | 9 ++++++--- desktop/config/hypr/sjb/functions.lua | 4 ++++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/desktop/config/hypr/sjb/bindings.lua b/desktop/config/hypr/sjb/bindings.lua index bd87f83..a9296f5 100644 --- a/desktop/config/hypr/sjb/bindings.lua +++ b/desktop/config/hypr/sjb/bindings.lua @@ -109,7 +109,8 @@ hl.bind("SUPER + ALT + SHIFT + Tab", hl.dsp.focus({ workspace = "previous", on_c -- arrange split ratio hl.bind("SUPER + SHIFT + M", toggle_master, { description = "Layout: Toggle master size" }) hl.bind("SUPER + M", function() - local current_layout = hl.get_config("general.layout") + local ws = hl.get_active_workspace() + local current_layout = ws.tiled_layout if current_layout == "master" then hl.dispatch(hl.dsp.layout("swapwithmaster")) end @@ -119,7 +120,8 @@ hl.bind("SUPER + M", function() end, { description = "Layout: Swap with master" }) hl.bind("SUPER + period", function() - local current_layout = hl.get_config("general.layout") + local ws = hl.get_active_workspace() + local current_layout = ws.tiled_layout if current_layout == "master" then hl.dispatch(hl.dsp.layout("cycleprev")) hl.dispatch(hl.dsp.layout("swapwithmaster")) @@ -133,7 +135,8 @@ hl.bind("SUPER + period", function() end, { description = "Layout: Cycle next" }) hl.bind("SUPER + comma", function() - local current_layout = hl.get_config("general.layout") + local ws = hl.get_active_workspace() + local current_layout = ws.tiled_layout if current_layout == "master" then hl.dispatch(hl.dsp.layout("cyclenext")) hl.dispatch(hl.dsp.layout("swapwithmaster")) diff --git a/desktop/config/hypr/sjb/functions.lua b/desktop/config/hypr/sjb/functions.lua index bdfd735..0a88289 100644 --- a/desktop/config/hypr/sjb/functions.lua +++ b/desktop/config/hypr/sjb/functions.lua @@ -131,6 +131,10 @@ function toggle_master() end end + if mfact == nil then + return + end + if mfact == 0.7 then mfact = 0.5 else