fixed awmtk, somehow. also added prototype for drawers.
This commit is contained in:
parent
6ab5aa4bd7
commit
4269061305
|
@ -87,11 +87,7 @@ awful.screen.connect_for_each_screen(function(s)
|
|||
--require("widgets.polylauncher")({vertical = false}),
|
||||
--s.mytaglist,
|
||||
s.mypromptbox,
|
||||
require("widgets.current_window")({
|
||||
style = {
|
||||
icon_bg_normal = beautiful.topbar_bg
|
||||
}
|
||||
}),
|
||||
require("widgets.wintitle")({}),
|
||||
spacing = 3
|
||||
},
|
||||
-- Middle widget
|
||||
|
@ -108,38 +104,24 @@ awful.screen.connect_for_each_screen(function(s)
|
|||
{ -- Right widgets
|
||||
layout = wibox.layout.fixed.horizontal,
|
||||
awful.widget.keyboardlayout(),
|
||||
require("widgets.drawer")({
|
||||
wibox.widget.systray(),
|
||||
vertical = false
|
||||
}),
|
||||
require("widgets.wallpapers")({
|
||||
screen = s,
|
||||
path = os.getenv("HOME").."/Pictures/Wallpapers/",
|
||||
style = {
|
||||
icon_bg_normal = beautiful.topbar_bg
|
||||
}
|
||||
}),
|
||||
require("widgets.mailbox")({
|
||||
screen = s,
|
||||
style = {
|
||||
rounding = 1,
|
||||
icon_bg_normal = beautiful.topbar_bg
|
||||
}
|
||||
}),
|
||||
--wibox.widget.systray(),
|
||||
require("widgets.volume")({
|
||||
style = {
|
||||
icon_bg_normal = beautiful.topbar_bg
|
||||
}
|
||||
}),
|
||||
require("widgets.volume")({}),
|
||||
require("widgets.battery")({
|
||||
percentage = true,
|
||||
style = {
|
||||
icon_bg_normal = beautiful.topbar_bg
|
||||
}
|
||||
}),
|
||||
wibox.widget.textclock(),
|
||||
require("widgets.username")({
|
||||
style = {
|
||||
icon_bg_normal = beautiful.topbar_bg
|
||||
}
|
||||
}),
|
||||
require("widgets.username")({}),
|
||||
s.mylayoutbox,
|
||||
spacing = 4
|
||||
},
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -187,7 +187,7 @@ awmtk.create_prefix = function(style,prefix,index)
|
|||
-- Create a prefix for new widgets to use
|
||||
local keys = index
|
||||
for _,k in pairs(keys) do
|
||||
style[prefix..k] = style[prefix..k] or style[k] or parent[k]
|
||||
style[prefix..k] = style[prefix..k] or style[k]
|
||||
end
|
||||
return style
|
||||
end
|
||||
|
@ -235,22 +235,15 @@ defaults.shape_border_color = defaults.shape_border_color or defaults.bg_normal
|
|||
-- Extra variables
|
||||
defaults.inner_margin = defaults.inner_margin or 5
|
||||
defaults.rounding = defaults.rounding or 0
|
||||
local new_defaults = {}
|
||||
-- Generate classes variables
|
||||
for _,class in pairs(classes) do
|
||||
for parameter,value in pairs(defaults) do
|
||||
new_defaults[class..parameter] = (
|
||||
defaults[class..parameter] = (
|
||||
defaults[class..parameter] or
|
||||
value
|
||||
)
|
||||
end
|
||||
end
|
||||
for parameter,value in pairs(defaults) do
|
||||
new_defaults[parameter] = value
|
||||
end
|
||||
defaults = setmetatable(new_defaults,{
|
||||
__index = beautiful
|
||||
})
|
||||
--make icons look less weird
|
||||
defaults.icon_inner_margin = beautiful.icon_inner_margin or 0
|
||||
--add spacing for lists
|
||||
|
|
|
@ -142,7 +142,13 @@ theme.topbar_bg = {
|
|||
|
||||
theme.titlebar_rounding = 6
|
||||
theme.bg_systray = "#3A3A36"
|
||||
theme.prompt_bg = theme.titlebar_bg_normal
|
||||
theme.prompt_bg = theme.topbar_bg
|
||||
theme.wintitle_icon_bg_normal = theme.topbar_bg
|
||||
theme.wallpapers_icon_bg_normal = theme.topbar_bg
|
||||
theme.mailbox_icon_bg_normal = theme.topbar_bg
|
||||
theme.volume_icon_bg_normal = theme.topbar_bg
|
||||
theme.battery_icon_bg_normal = theme.topbar_bg
|
||||
theme.username_icon_bg_normal = theme.topbar_bg
|
||||
-- Generate taglist squares:
|
||||
local taglist_square_size = dpi(4)
|
||||
theme.taglist_squares_sel = theme_assets.taglist_squares_sel(
|
||||
|
|
|
@ -0,0 +1,38 @@
|
|||
local awful = require("awful")
|
||||
local wibox = require("wibox")
|
||||
local awmtk = require("awmtk")
|
||||
|
||||
return function(args)
|
||||
local style = awmtk.style(awmtk.defaults, args.style or {},"drawer_")
|
||||
local contained_widget = {
|
||||
id = "contents",
|
||||
widget = wibox.container.background,
|
||||
layout = (args.vertical and wibox.layout.fixed.vertical) or
|
||||
wibox.layout.fixed.horizontal,
|
||||
visible = false
|
||||
}
|
||||
for k,v in ipairs(args) do
|
||||
table.insert(contained_widget,v)
|
||||
end
|
||||
local widget = style.icon {
|
||||
contained_widget,
|
||||
{
|
||||
widget = wibox.widget.imagebox,
|
||||
image = style["battery_missing_symbolic"],
|
||||
id = "widget_toggle",
|
||||
resize = true
|
||||
},
|
||||
layout = (args.vertical and wibox.layout.fixed.vertical) or
|
||||
wibox.layout.fixed.horizontal,
|
||||
spacing = style.drawer_container_spacing_horizontal
|
||||
}
|
||||
widget:get_children_by_id("widget_toggle")[1]:buttons(
|
||||
awful.util.table.join(
|
||||
awful.button({},1,function()
|
||||
local subwidget = widget:get_children_by_id("contents")[1]
|
||||
subwidget.visible = not subwidget.visible
|
||||
end)
|
||||
)
|
||||
)
|
||||
return widget
|
||||
end
|
|
@ -10,7 +10,7 @@ local widget = {}
|
|||
local function worker(args)
|
||||
local args = args or {}
|
||||
-- Set up style variables
|
||||
style = awmtk.style(awmtk.defaults,args.style,"mailbox_")
|
||||
style = awmtk.style(awmtk.defaults,args.style or {},"mailbox_")
|
||||
style.mailbox_container_width = style.mailbox_container_width or 260
|
||||
style.mailbox_button_height = style.mailbox_button_heihgt or 40
|
||||
args.mail_limit = args.mail_limit or 8
|
||||
|
|
|
@ -4,7 +4,7 @@ local wibox = require("wibox")
|
|||
local awmtk = require("awmtk")
|
||||
|
||||
return function(args)
|
||||
local style = awmtk.style(awmtk.defaults, args.style or {},"username_")
|
||||
local style = awmtk.style(awmtk.defaults, args.style or {},"wintitle_")
|
||||
local icon = style.icon({
|
||||
{
|
||||
widget = wibox.widget.textbox,
|
||||
|
@ -12,7 +12,7 @@ return function(args)
|
|||
id = "widget_text"
|
||||
},
|
||||
layout = wibox.layout.fixed.horizontal,
|
||||
spacing = style.username_container_spacing_horizontal or 4
|
||||
spacing = style.wintitle_container_spacing_horizontal or 4
|
||||
})
|
||||
local text = icon:get_children_by_id("widget_text")[1]
|
||||
client.connect_signal("focus", function()
|
Loading…
Reference in New Issue