feat(hyprland): make M key layout-aware for swap/consume-or-expel
This commit is contained in:
@@ -339,7 +339,15 @@ hl.bind(LEADER .. "ALT + Tab", hl.dsp.focus({ workspace = "previous", on_current
|
|||||||
-- arrange split ratio
|
-- arrange split ratio
|
||||||
hl.bind(LEADER .. "X", toggle_master, { description = "Layout: Toggle master size" })
|
hl.bind(LEADER .. "X", toggle_master, { description = "Layout: Toggle master size" })
|
||||||
-- hl.bind(LEADER .. "equal", hl.dsp.layout("mfact exact 0.5"))
|
-- hl.bind(LEADER .. "equal", hl.dsp.layout("mfact exact 0.5"))
|
||||||
hl.bind(LEADER .. "M", hl.dsp.layout("swapwithmaster"))
|
hl.bind(LEADER .. "M", function()
|
||||||
|
local current_layout = hl.get_config("general.layout")
|
||||||
|
if current_layout == "master" then
|
||||||
|
hl.dispatch(hl.dsp.layout("swapwithmaster"))
|
||||||
|
end
|
||||||
|
if current_layout == "scrolling" then
|
||||||
|
hl.dispatch(hl.dsp.layout("consume_or_expel next"))
|
||||||
|
end
|
||||||
|
end, { description = "Layout: Swap with master" })
|
||||||
|
|
||||||
-- hl.bind(LEADER .. "M", hl.dsp.layout("rollnext"))
|
-- hl.bind(LEADER .. "M", hl.dsp.layout("rollnext"))
|
||||||
hl.bind(LEADER .. "period", function()
|
hl.bind(LEADER .. "period", function()
|
||||||
|
|||||||
Reference in New Issue
Block a user