feat: allow layout_dispatcher
This commit is contained in:
@@ -54,4 +54,18 @@ function bind.map(table)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function bind.layout_dispatcher(actions, fallback)
|
||||||
|
return function()
|
||||||
|
local ws = hl.get_active_special_workspace() or hl.get_active_workspace()
|
||||||
|
if not ws then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
local action = actions[ws.tiled_layout] or fallback
|
||||||
|
if action then
|
||||||
|
hl.dispatch(action)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
return bind
|
return bind
|
||||||
|
|||||||
Reference in New Issue
Block a user