From 1681bea42dd2f11ba3fe6df05560d0b231de3c76 Mon Sep 17 00:00:00 2001 From: Vaxry <43317083+vaxerski@users.noreply.github.com> Date: Wed, 6 May 2026 13:56:12 +0100 Subject: config/lua: add simple layout API (#14258) Adds a simple layout lua api --- example/layouts/columns.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 example/layouts/columns.lua (limited to 'example/layouts/columns.lua') 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, +}) -- cgit v1.2.3