template: Add configurable margins to the generic layout widget

This commit is contained in:
Emmanuel Lepage Vallee 2017-08-07 16:49:48 -04:00
parent 1326ec20fd
commit a9c06fb8c5
1 changed files with 2 additions and 2 deletions

View File

@ -7,7 +7,7 @@ local beautiful = require( "beautiful" )
local unpack = unpack or table.unpack -- luacheck: globals unpack (compatibility with Lua 5.1)
-- Create a generic rectangle widget to show layout disposition
local function generic_widget(text, col)
local function generic_widget(text, col, margins)
return wibox.widget {
{
{
@ -30,7 +30,7 @@ local function generic_widget(text, col)
} or nil,
widget = wibox.layout.stack
},
margins = 5,
margins = margins or 5,
set_text = function(self, text2)
self:get_children_by_id("text")[1]:set_text(text2)
end,