diff --git a/lib/wibox/init.lua b/lib/wibox/init.lua index 5952571ae..9c14e5086 100644 --- a/lib/wibox/init.lua +++ b/lib/wibox/init.lua @@ -43,6 +43,14 @@ function wibox:set_bg(c) self._drawable:set_bg(c) end +--- Set the background image of the drawable +-- If `image` is a function, it will be called with `(context, cr, width, height)` +-- as arguments. Any other arguments passed to this method will be appended. +-- @param image A background image or a function +function wibox:set_bgimage(image, ...) + self._drawable:set_bgimage(image, ...) +end + --- Set the foreground of the wibox -- @param c The foreground to use. This must either be a cairo pattern object, -- nil or a string that gears.color() understands.