fix(hyprland): use active workspace layout
This commit is contained in:
@@ -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"))
|
||||
|
||||
@@ -131,6 +131,10 @@ function toggle_master()
|
||||
end
|
||||
end
|
||||
|
||||
if mfact == nil then
|
||||
return
|
||||
end
|
||||
|
||||
if mfact == 0.7 then
|
||||
mfact = 0.5
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user