diff options
| author | Vaxry <43317083+vaxerski@users.noreply.github.com> | 2026-05-06 13:56:12 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-05-06 13:56:12 +0100 |
| commit | 1681bea42dd2f11ba3fe6df05560d0b231de3c76 (patch) | |
| tree | 899103dbddf675a01758c7cdd379224c9c81a7fb /example/layouts/columns.lua | |
| parent | 5f1350f522d3fe3af78cbe30a98311763b3509d5 (diff) | |
config/lua: add simple layout API (#14258)
Adds a simple layout lua api
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, +}) |
