diff --git a/lib/awful/titlebar.lua b/lib/awful/titlebar.lua index 41ec779b5..f259453f2 100644 --- a/lib/awful/titlebar.lua +++ b/lib/awful/titlebar.lua @@ -26,6 +26,12 @@ local titlebar = { widget = {} } +--- Set a declarative widget hierarchy description. +-- See [The declarative layout system](../documentation/03-declarative-layout.md.html) +-- @param args An array containing the widgets disposition +-- @name setup +-- @class function + --- Show tooltips when hover on titlebar buttons (defaults to 'true') titlebar.enable_tooltip = true @@ -108,6 +114,9 @@ local function new(c, args) -- Make sure the titlebar has the right colors applied bars[position].update_colors() + -- Handle declarative/recursive widget container + ret.setup = base.widget.setup + return ret end diff --git a/lib/wibox/init.lua b/lib/wibox/init.lua index 5952571ae..be61fadd1 100644 --- a/lib/wibox/init.lua +++ b/lib/wibox/init.lua @@ -21,6 +21,7 @@ local sort = require("gears.sort") local beautiful = require("beautiful") local surface = require("gears.surface") local cairo = require("lgi").cairo +local base = require("wibox.widget.base") --- This provides widget box windows. Every wibox can also be used as if it were -- a drawin. All drawin functions and properties are also available on wiboxes! @@ -36,6 +37,13 @@ function wibox:set_widget(widget) self._drawable:set_widget(widget) end +--- Set a declarative widget hierarchy description. +-- See [The declarative layout system](../documentation/03-declarative-layout.md.html) +-- @param args An array containing the widgets disposition +-- @name setup +-- @class function +wibox.setup = base.widget.setup + --- Set the background of the wibox -- @param c The background to use. This must either be a cairo pattern object, -- nil or a string that gears.color() understands.