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