Adding the default class and a generic namespace

This commit is contained in:
Yessiest 2022-04-08 17:33:44 +04:00
parent 7c105de388
commit dccd5c0a5f
1 changed files with 34 additions and 4 deletions

View File

@ -24,15 +24,45 @@ end
-- }}} -- }}}
-- {{{ Classes -- {{{ Classes and namespaces
-- Default namespace -- Default namespace
awmtk.default = setmetatable({}, { awmtk.default = setmetatable({
-- { Backgrounds -- { Backgrounds
-- custom background color for highlighting elements -- custom background color for highlighting elements
bg_highlight = beautiful.bg_highlight or beautiful.bg_focus bg_highlight = beautiful.bg_highlight or beautiful.bg_focus,
-- }
-- { Borders
-- Borders for popups
shape_border_width = beautiful.shape_border_width or 0,
shape_border_color = beautiful.shape_border_color or beautiful.bg_normal,
-- }
-- { Shapes
inner_margin = beautiful.inner_margin or 5
rounding = beautiful.rounding or 0
-- } -- }
-- {
}, { __index = beautiful }) }, { __index = beautiful })
-- Container subnamespace
-- We copy the table instead of referncing default namespace to avoid recursion
awmtk.default.container = setmetatable({
-- { Backgrounds
-- custom background color for highlighting elements
bg_highlight = beautiful.bg_highlight or beautiful.bg_focus,
-- }
-- { Borders
-- Borders for popups
shape_border_width = beautiful.shape_border_width or 0,
shape_border_color = beautiful.shape_border_color or beautiful.bg_normal,
-- }
-- { Shapes
inner_margin = beautiful.inner_margin or 5
rounding = beautiful.rounding or 0
-- }
-- { Layout spacing
spacing = (beautiful.container and beautiful.container.spacing) or 2
},{
__index = beautiful
})