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