From da47357ae7f0c370a2dc0c693c90445eae28e8e3 Mon Sep 17 00:00:00 2001 From: Emmanuel Lepage Vallee Date: Fri, 5 Aug 2016 01:13:39 -0400 Subject: [PATCH] widget.common: Add shape support --- lib/awful/widget/common.lua | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/awful/widget/common.lua b/lib/awful/widget/common.lua index 78f57172..bd46fa66 100644 --- a/lib/awful/widget/common.lua +++ b/lib/awful/widget/common.lua @@ -84,7 +84,9 @@ function common.list_update(w, buttons, label, data, objects) } end - local text, bg, bg_image, icon = label(o, tb) + local text, bg, bg_image, icon, args = label(o, tb) + args = args or {} + -- The text might be invalid, so use pcall. if text == nil or text == "" then tbm:set_margins(0) @@ -104,6 +106,11 @@ function common.list_update(w, buttons, label, data, objects) else ibm:set_margins(0) end + + bgb.shape = args.shape + bgb.shape_border_width = args.shape_border_width + bgb.shape_border_color = args.shape_border_color + w:add(bgb) end end