summaryrefslogtreecommitdiff
path: root/example/layouts/columns.lua
blob: dc907cd4c56a35886a6f1165a608b3a2edc4811b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
hl.layout.register("columns", {
    recalculate = function(ctx)
        local n = #ctx.targets
        if n == 0 then
            return
        end

        for i, target in ipairs(ctx.targets) do
            target:place(ctx:column(i, n))
        end
    end,
})