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
|
-- arrange split ratio
|
||||||
hl.bind("SUPER + SHIFT + M", toggle_master, { description = "Layout: Toggle master size" })
|
hl.bind("SUPER + SHIFT + M", toggle_master, { description = "Layout: Toggle master size" })
|
||||||
hl.bind("SUPER + M", function()
|
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
|
if current_layout == "master" then
|
||||||
hl.dispatch(hl.dsp.layout("swapwithmaster"))
|
hl.dispatch(hl.dsp.layout("swapwithmaster"))
|
||||||
end
|
end
|
||||||
@@ -119,7 +120,8 @@ hl.bind("SUPER + M", function()
|
|||||||
end, { description = "Layout: Swap with master" })
|
end, { description = "Layout: Swap with master" })
|
||||||
|
|
||||||
hl.bind("SUPER + period", function()
|
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
|
if current_layout == "master" then
|
||||||
hl.dispatch(hl.dsp.layout("cycleprev"))
|
hl.dispatch(hl.dsp.layout("cycleprev"))
|
||||||
hl.dispatch(hl.dsp.layout("swapwithmaster"))
|
hl.dispatch(hl.dsp.layout("swapwithmaster"))
|
||||||
@@ -133,7 +135,8 @@ hl.bind("SUPER + period", function()
|
|||||||
end, { description = "Layout: Cycle next" })
|
end, { description = "Layout: Cycle next" })
|
||||||
|
|
||||||
hl.bind("SUPER + comma", function()
|
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
|
if current_layout == "master" then
|
||||||
hl.dispatch(hl.dsp.layout("cyclenext"))
|
hl.dispatch(hl.dsp.layout("cyclenext"))
|
||||||
hl.dispatch(hl.dsp.layout("swapwithmaster"))
|
hl.dispatch(hl.dsp.layout("swapwithmaster"))
|
||||||
|
|||||||
@@ -131,6 +131,10 @@ function toggle_master()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if mfact == nil then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
if mfact == 0.7 then
|
if mfact == 0.7 then
|
||||||
mfact = 0.5
|
mfact = 0.5
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user