Class pinnacle.layout
​
Layout management.
Read the wiki page for more information.
Fields ​
builtin ​
builtin
= builtin
Builtin layout generators.
Functions ​
function manage ​
function pinnacle.layout.manage(on_layout: fun(args: pinnacle.layout.LayoutArgs): pinnacle.layout.LayoutNode)
-> pinnacle.layout.LayoutRequester
Begins managing layout requests from the compositor.
You must call this function to get windows to lay out. The provided function will be run with the arguments of the layout request. It must return a LayoutNode
that represents the root of a layout tree.
Example ​
lua
local layout_requester = Layout.manage(function(args)
local first_tag = args.tags[1]
if not first_tag then
return {
children = {},
}
end
layout_cycler.current_tag = first_tag
return layout_cycler:layout(args.window_count)
end)
Parameters ​
on_layout
: fun(args: pinnacle.layout.LayoutArgs): pinnacle.layout.LayoutNode
- A function that receives layout arguments and builds and returns a layout tree.
Returns ​
pinnacle.layout.LayoutRequester
- A requester that allows you to force the compositor to request a layout.