From: Elias Fleckenstein Date: Mon, 29 Nov 2021 22:30:59 +0000 (+0100) Subject: Add box function X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=94d53fc0aaab88ee23e6abd3c03f90fa088fb1a1;p=cutie.git Add box function --- diff --git a/init.lua b/init.lua index b137ecb..ae333e5 100644 --- a/init.lua +++ b/init.lua @@ -225,6 +225,14 @@ function cutie.flush_buffer() cutie.buffer = "" end +function cutie.box(size) + return { + "┌" .. string.rep("─", size[1]) .. "┐", string.rep( + "│" .. string.rep(" ", size[1]) .. "│", size[2]), + "└" .. string.rep("─", size[1]) .. "┘", + } +end + -- terminal size function cutie.handle_resize()