AwesomeFiles/config/awesome/modules/bling/helpers/shape.lua
2022-07-11 20:06:55 -05:00

31 lines
571 B
Lua
Executable file

local gears = require("gears")
shape = {}
-- Create rounded rectangle shape (in one line)
function shape.rrect(radius)
return function(cr, width, height)
gears.shape.rounded_rect(cr, width, height, radius)
end
end
-- Create partially rounded rect
function shape.prrect(radius, tl, tr, br, bl)
return function(cr, width, height)
gears.shape.partially_rounded_rect(
cr,
width,
height,
tl,
tr,
br,
bl,
radius
)
end
end
return shape