diff options
Diffstat (limited to 'example/layouts/columns.lua')
| -rw-r--r-- | example/layouts/columns.lua | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/example/layouts/columns.lua b/example/layouts/columns.lua new file mode 100644 index 00000000..dc907cd4 --- /dev/null +++ b/example/layouts/columns.lua @@ -0,0 +1,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, +}) |
