Reworked a whole lot. New config file and theme config file for easier changes. Did #19. And much more
This commit is contained in:
@@ -8,7 +8,7 @@ local dpi = require("beautiful").xresources.apply_dpi
|
||||
local gears = require("gears")
|
||||
local wibox = require("wibox")
|
||||
|
||||
return function(s, widgets)
|
||||
return function(s, w)
|
||||
|
||||
local top_right = awful.popup {
|
||||
widget = wibox.container.background,
|
||||
@@ -18,7 +18,7 @@ return function(s, widgets)
|
||||
screen = s,
|
||||
placement = function(c) awful.placement.top_right(c, { margins = dpi(10) }) end,
|
||||
shape = function(cr, width, height)
|
||||
gears.shape.rounded_rect(cr, width, height, 5)
|
||||
gears.shape.rounded_rect(cr, width, height, dpi(6))
|
||||
end
|
||||
}
|
||||
|
||||
@@ -28,40 +28,40 @@ return function(s, widgets)
|
||||
|
||||
local function prepare_widgets(widgets)
|
||||
local layout = {
|
||||
forced_height = 45,
|
||||
forced_height = dpi(50),
|
||||
layout = wibox.layout.fixed.horizontal
|
||||
}
|
||||
for i, widget in pairs(widgets) do
|
||||
if i == 1 then
|
||||
table.insert(layout,
|
||||
{
|
||||
widget,
|
||||
left = dpi(6),
|
||||
right = dpi(3),
|
||||
top = dpi(6),
|
||||
bottom = dpi(6),
|
||||
widget = wibox.container.margin
|
||||
})
|
||||
widget,
|
||||
left = dpi(6),
|
||||
right = dpi(3),
|
||||
top = dpi(6),
|
||||
bottom = dpi(6),
|
||||
widget = wibox.container.margin
|
||||
})
|
||||
elseif i == #widgets then
|
||||
table.insert(layout,
|
||||
{
|
||||
widget,
|
||||
left = dpi(3),
|
||||
right = dpi(6),
|
||||
top = dpi(6),
|
||||
bottom = dpi(6),
|
||||
widget = wibox.container.margin
|
||||
})
|
||||
widget,
|
||||
left = dpi(3),
|
||||
right = dpi(6),
|
||||
top = dpi(6),
|
||||
bottom = dpi(6),
|
||||
widget = wibox.container.margin
|
||||
})
|
||||
else
|
||||
table.insert(layout,
|
||||
{
|
||||
widget,
|
||||
left = dpi(3),
|
||||
right = dpi(3),
|
||||
top = dpi(6),
|
||||
bottom = dpi(6),
|
||||
widget = wibox.container.margin
|
||||
})
|
||||
widget,
|
||||
left = dpi(3),
|
||||
right = dpi(3),
|
||||
top = dpi(6),
|
||||
bottom = dpi(6),
|
||||
widget = wibox.container.margin
|
||||
})
|
||||
end
|
||||
end
|
||||
return layout
|
||||
@@ -70,7 +70,7 @@ return function(s, widgets)
|
||||
top_right:setup {
|
||||
nil,
|
||||
nil,
|
||||
prepare_widgets(widgets),
|
||||
prepare_widgets(w),
|
||||
layout = wibox.layout.align.horizontal
|
||||
}
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user