fixed base functionality of awmtk2
This commit is contained in:
parent
44a1c20d61
commit
124159433c
|
@ -5,7 +5,7 @@ global = {}
|
|||
global.awesome_dir = os.getenv("HOME").."/.config/awesome/"
|
||||
global.config_dir = os.getenv("HOME").."/.awesome/"
|
||||
global.themes_dir = os.getenv("HOME").."/.config/awesome/themes/"
|
||||
global.theme = global.awesome_dir .. "themes/unity/theme.lua"
|
||||
global.theme = global.awesome_dir .. "themes/unity_simplified/theme.lua"
|
||||
global.terminal = "xterm"
|
||||
global.editor = os.getenv("EDITOR") or "vim"
|
||||
global.editor_cmd = global.terminal .. " -e ".. global.editor
|
||||
|
|
|
@ -6,11 +6,9 @@ local beautiful = require("beautiful")
|
|||
local awmtk = {}
|
||||
|
||||
-- {{{ Utils
|
||||
local debugdata = io.open("/home/yessiest/.awesome_errors","w")
|
||||
awmtk.create_class = function(name,overrides,style,parent_class)
|
||||
return setmetatable(overrides,{
|
||||
__index = function(self,k)
|
||||
debugdata:write(tostring(name)..": "..tostring(k).."\n")
|
||||
-- Per-widget overrides are top priority
|
||||
if rawget(self,k) then
|
||||
return rawget(self,k)
|
||||
|
@ -27,13 +25,7 @@ end
|
|||
|
||||
awmtk.create_style = function(name,parent,overrides)
|
||||
local new_style = setmetatable(beautiful[name] or {},{
|
||||
__index = function(self,k)
|
||||
if rawget(self,k) then
|
||||
return rawget(self,k)
|
||||
else
|
||||
return parent[k]
|
||||
end
|
||||
end
|
||||
__index = parent
|
||||
})
|
||||
for name,parent_class in pairs(parent) do
|
||||
new_style[name] = awmtk.create_class(
|
||||
|
@ -53,7 +45,7 @@ end
|
|||
|
||||
-- Default style
|
||||
awmtk.default = {
|
||||
base = setmetatable({},{
|
||||
base = setmetatable({
|
||||
-- { Backgrounds
|
||||
-- custom background color for highlighting elements
|
||||
bg_highlight = beautiful.bg_highlight or beautiful.bg_focus,
|
||||
|
@ -70,7 +62,6 @@ awmtk.default = {
|
|||
},{__index = beautiful})
|
||||
}
|
||||
|
||||
|
||||
-- Container subclass
|
||||
awmtk.default.container = awmtk.create_class("container",{
|
||||
},awmtk.default,awmtk.default.base)
|
||||
|
|
|
@ -16,11 +16,12 @@ return function(args)
|
|||
layout = wibox.layout.fixed.vertical
|
||||
},
|
||||
widget = wibox.container.margin,
|
||||
margin = style.container.inner_margin
|
||||
margins = style.container.inner_margin
|
||||
},
|
||||
bg = style.container.bg_normal,
|
||||
widget = wibox.container.background
|
||||
},
|
||||
shape = gears.shape
|
||||
visible = false,
|
||||
ontop = true
|
||||
})
|
||||
|
@ -30,5 +31,11 @@ return function(args)
|
|||
launchpad.visible = not launchpad.visible
|
||||
end)
|
||||
))
|
||||
io.open("/home/yessiest/.debug2","w"):write(
|
||||
tostring(style.container.bg_normal).."\n"..
|
||||
tostring(style.container.inner_margin).."\n"..
|
||||
tostring(style.icon.inner_margin).."\n"..
|
||||
tostring(style.base.bg_normal)
|
||||
):close()
|
||||
return launchpad
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue