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}),
|
--require("widgets.polylauncher")({vertical = false}),
|
||||||
--s.mytaglist,
|
--s.mytaglist,
|
||||||
s.mypromptbox,
|
s.mypromptbox,
|
||||||
require("widgets.current_window")({
|
require("widgets.wintitle")({}),
|
||||||
style = {
|
|
||||||
icon_bg_normal = beautiful.topbar_bg
|
|
||||||
}
|
|
||||||
}),
|
|
||||||
spacing = 3
|
spacing = 3
|
||||||
},
|
},
|
||||||
-- Middle widget
|
-- Middle widget
|
||||||
|
@ -108,38 +104,24 @@ awful.screen.connect_for_each_screen(function(s)
|
||||||
{ -- Right widgets
|
{ -- Right widgets
|
||||||
layout = wibox.layout.fixed.horizontal,
|
layout = wibox.layout.fixed.horizontal,
|
||||||
awful.widget.keyboardlayout(),
|
awful.widget.keyboardlayout(),
|
||||||
|
require("widgets.drawer")({
|
||||||
|
wibox.widget.systray(),
|
||||||
|
vertical = false
|
||||||
|
}),
|
||||||
require("widgets.wallpapers")({
|
require("widgets.wallpapers")({
|
||||||
screen = s,
|
screen = s,
|
||||||
path = os.getenv("HOME").."/Pictures/Wallpapers/",
|
path = os.getenv("HOME").."/Pictures/Wallpapers/",
|
||||||
style = {
|
|
||||||
icon_bg_normal = beautiful.topbar_bg
|
|
||||||
}
|
|
||||||
}),
|
}),
|
||||||
require("widgets.mailbox")({
|
require("widgets.mailbox")({
|
||||||
screen = s,
|
screen = s,
|
||||||
style = {
|
|
||||||
rounding = 1,
|
|
||||||
icon_bg_normal = beautiful.topbar_bg
|
|
||||||
}
|
|
||||||
}),
|
}),
|
||||||
--wibox.widget.systray(),
|
--wibox.widget.systray(),
|
||||||
require("widgets.volume")({
|
require("widgets.volume")({}),
|
||||||
style = {
|
|
||||||
icon_bg_normal = beautiful.topbar_bg
|
|
||||||
}
|
|
||||||
}),
|
|
||||||
require("widgets.battery")({
|
require("widgets.battery")({
|
||||||
percentage = true,
|
percentage = true,
|
||||||
style = {
|
|
||||||
icon_bg_normal = beautiful.topbar_bg
|
|
||||||
}
|
|
||||||
}),
|
}),
|
||||||
wibox.widget.textclock(),
|
wibox.widget.textclock(),
|
||||||
require("widgets.username")({
|
require("widgets.username")({}),
|
||||||
style = {
|
|
||||||
icon_bg_normal = beautiful.topbar_bg
|
|
||||||
}
|
|
||||||
}),
|
|
||||||
s.mylayoutbox,
|
s.mylayoutbox,
|
||||||
spacing = 4
|
spacing = 4
|
||||||
},
|
},
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -187,7 +187,7 @@ awmtk.create_prefix = function(style,prefix,index)
|
||||||
-- Create a prefix for new widgets to use
|
-- Create a prefix for new widgets to use
|
||||||
local keys = index
|
local keys = index
|
||||||
for _,k in pairs(keys) do
|
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
|
end
|
||||||
return style
|
return style
|
||||||
end
|
end
|
||||||
|
@ -235,22 +235,15 @@ defaults.shape_border_color = defaults.shape_border_color or defaults.bg_normal
|
||||||
-- Extra variables
|
-- Extra variables
|
||||||
defaults.inner_margin = defaults.inner_margin or 5
|
defaults.inner_margin = defaults.inner_margin or 5
|
||||||
defaults.rounding = defaults.rounding or 0
|
defaults.rounding = defaults.rounding or 0
|
||||||
local new_defaults = {}
|
|
||||||
-- Generate classes variables
|
-- Generate classes variables
|
||||||
for _,class in pairs(classes) do
|
for _,class in pairs(classes) do
|
||||||
for parameter,value in pairs(defaults) do
|
for parameter,value in pairs(defaults) do
|
||||||
new_defaults[class..parameter] = (
|
defaults[class..parameter] = (
|
||||||
defaults[class..parameter] or
|
defaults[class..parameter] or
|
||||||
value
|
value
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
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
|
--make icons look less weird
|
||||||
defaults.icon_inner_margin = beautiful.icon_inner_margin or 0
|
defaults.icon_inner_margin = beautiful.icon_inner_margin or 0
|
||||||
--add spacing for lists
|
--add spacing for lists
|
||||||
|
|
|
@ -142,7 +142,13 @@ theme.topbar_bg = {
|
||||||
|
|
||||||
theme.titlebar_rounding = 6
|
theme.titlebar_rounding = 6
|
||||||
theme.bg_systray = "#3A3A36"
|
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:
|
-- Generate taglist squares:
|
||||||
local taglist_square_size = dpi(4)
|
local taglist_square_size = dpi(4)
|
||||||
theme.taglist_squares_sel = theme_assets.taglist_squares_sel(
|
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 function worker(args)
|
||||||
local args = args or {}
|
local args = args or {}
|
||||||
-- Set up style variables
|
-- 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_container_width = style.mailbox_container_width or 260
|
||||||
style.mailbox_button_height = style.mailbox_button_heihgt or 40
|
style.mailbox_button_height = style.mailbox_button_heihgt or 40
|
||||||
args.mail_limit = args.mail_limit or 8
|
args.mail_limit = args.mail_limit or 8
|
||||||
|
|
|
@ -4,7 +4,7 @@ local wibox = require("wibox")
|
||||||
local awmtk = require("awmtk")
|
local awmtk = require("awmtk")
|
||||||
|
|
||||||
return function(args)
|
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({
|
local icon = style.icon({
|
||||||
{
|
{
|
||||||
widget = wibox.widget.textbox,
|
widget = wibox.widget.textbox,
|
||||||
|
@ -12,7 +12,7 @@ return function(args)
|
||||||
id = "widget_text"
|
id = "widget_text"
|
||||||
},
|
},
|
||||||
layout = wibox.layout.fixed.horizontal,
|
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]
|
local text = icon:get_children_by_id("widget_text")[1]
|
||||||
client.connect_signal("focus", function()
|
client.connect_signal("focus", function()
|
Loading…
Reference in New Issue