Compare commits

...

4 Commits

2 changed files with 51 additions and 6 deletions

View File

@ -65,12 +65,12 @@ local menu_widget = menu({
},
{ "Stop task",
function()
awful.spawn("kill "..tostring(c.pid))
awful.spawn("kill "..tostring(client.focus.pid))
end
},
{ "Kill task",
function()
awful.spawn("kill -s KILL "..tostring(c.pid))
awful.spawn("kill -s KILL "..tostring(client.focus.pid))
end
},
{ "Debug info",

View File

@ -7,17 +7,62 @@ local awmtk = {}
-- {{{ Utils
awmtk.subclass = function(parent_class,instance_overrides,name)
return setmetatable(instance_overrides,{
__index = function(self,k)
if rawget(self,k) then
return rawget(self,k)
elseif type(beautiful[name]) == "table" and beautiful[name][k] then
return beautiful[name][k]
elseif parent_class[k] then
return parent_class[k]
end
end
})
end
-- }}}
-- {{{ Classes
-- {{{ Classes and namespaces
-- Default namespace
awmtk.default = setmetatable({}, {
awmtk.default = 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
-- }
}, { __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
})