fix audio (hopefully last time), added new widgets(cpu/gpu/ram info), reworked the bars a bit, more stuff and fixes

This commit is contained in:
Kievits Rene
2022-05-08 01:51:44 +02:00
parent bfd342deac
commit 46d338cbaf
24 changed files with 1296 additions and 794 deletions

View File

@@ -10,89 +10,67 @@ local wibox = require("wibox")
return function(s, widgets)
local top_right = awful.popup {
widget = wibox.container.background,
ontop = false,
bg = color["Grey900"],
visible = true,
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)
end
}
local top_right = awful.popup {
widget = wibox.container.background,
ontop = false,
bg = color["Grey900"],
visible = true,
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)
end
}
top_right:setup {
nil,
nil,
{
{
widgets[1],
left = dpi(6),
right = dpi(3),
top = dpi(6),
bottom = dpi(6),
widget = wibox.container.margin
},
{
widgets[2],
left = dpi(3),
right = dpi(3),
top = dpi(6),
bottom = dpi(6),
widget = wibox.container.margin
},
{
widgets[3],
left = dpi(3),
right = dpi(3),
top = dpi(6),
bottom = dpi(6),
widget = wibox.container.margin
},
{
widgets[4],
left = dpi(3),
right = dpi(3),
top = dpi(6),
bottom = dpi(6),
widget = wibox.container.margin
},
{
widgets[5],
left = dpi(3),
right = dpi(3),
top = dpi(6),
bottom = dpi(6),
widget = wibox.container.margin
},
{
widgets[6],
left = dpi(3),
right = dpi(3),
top = dpi(6),
bottom = dpi(6),
widget = wibox.container.margin
},
{
widgets[7],
left = dpi(3),
right = dpi(3),
top = dpi(6),
bottom = dpi(6),
widget = wibox.container.margin
},
{
widgets[8],
left = dpi(3),
right = dpi(6),
top = dpi(6),
bottom = dpi(6),
widget = wibox.container.margin
},
forced_height = 45,
layout = wibox.layout.fixed.horizontal
},
layout = wibox.layout.align.horizontal
top_right:struts {
top = 55
}
local function prepare_widgets(widgets)
local layout = {
forced_height = 45,
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
})
elseif i == #widgets then
table.insert(layout,
{
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
})
end
end
return layout
end
top_right:setup {
nil,
nil,
prepare_widgets(widgets),
layout = wibox.layout.align.horizontal
}
end