From 1c76560da77bac9bb95ee47e666c7872b8dfe5eb Mon Sep 17 00:00:00 2001 From: Emmanuel Lepage Vallee Date: Thu, 3 Jan 2013 20:54:40 -0500 Subject: [PATCH] Add external function for {tag,task,tab}list background image Signed-off-by: Uli Schlachter --- lib/awful/widget/common.lua.in | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/awful/widget/common.lua.in b/lib/awful/widget/common.lua.in index d6c2a9f1d..a55526887 100644 --- a/lib/awful/widget/common.lua.in +++ b/lib/awful/widget/common.lua.in @@ -48,6 +48,7 @@ function common.list_update(w, buttons, label, data, objects) ib = cache.ib tb = cache.tb bgb = cache.bgb + m = cache.m else ib = wibox.widget.imagebox() tb = wibox.widget.textbox() @@ -68,7 +69,8 @@ function common.list_update(w, buttons, label, data, objects) data[o] = { ib = ib, tb = tb, - bgb = bgb + bgb = bgb, + m = m } end @@ -78,6 +80,9 @@ function common.list_update(w, buttons, label, data, objects) tb:set_markup("<Invalid text>") end bgb:set_bg(bg) + if type(bg_image) == "function" then + bg_image = bg_image(tb,o,m,objects,i) + end bgb:set_bgimage(bg_image) ib:set_image(icon) w:add(bgb)