Update mpris plugin with cover art
This commit is contained in:
parent
8d5ee408cf
commit
0ff84042ab
5 changed files with 145 additions and 27 deletions
85
crylia_bar/bottom_right_bar.lua
Normal file
85
crylia_bar/bottom_right_bar.lua
Normal file
|
@ -0,0 +1,85 @@
|
|||
--------------------------------------------------------------------------------------------------------------
|
||||
-- This is the statusbar, every widget, module and so on is combined to all the stuff you see on the screen --
|
||||
--------------------------------------------------------------------------------------------------------------
|
||||
-- Awesome Libs
|
||||
local awful = require("awful")
|
||||
local color = require("src.theme.colors")
|
||||
local cat = require("src.theme.catppuccin")
|
||||
local dpi = require("beautiful").xresources.apply_dpi
|
||||
local gears = require("gears")
|
||||
local wibox = require("wibox")
|
||||
|
||||
return function(s, widgets)
|
||||
|
||||
local bottom_right = awful.popup {
|
||||
widget = wibox.container.background,
|
||||
ontop = false,
|
||||
bg = color["Grey900"],
|
||||
visible = true,
|
||||
screen = s,
|
||||
maximum_height = dpi(80),
|
||||
placement = function(c) awful.placement.bottom_left(c, { margins = dpi(5) }) end,
|
||||
shape = function(cr, width, height)
|
||||
gears.shape.rounded_rect(cr, width, height, 5)
|
||||
end
|
||||
}
|
||||
|
||||
bottom_right:struts {
|
||||
bottom = 85
|
||||
}
|
||||
|
||||
local function prepare_widgets(widgets)
|
||||
local layout = {
|
||||
layout = wibox.layout.fixed.horizontal
|
||||
}
|
||||
if #widgets == 1 then
|
||||
table.insert(layout,
|
||||
{
|
||||
widgets[1],
|
||||
widget = wibox.container.margin
|
||||
})
|
||||
return layout;
|
||||
end
|
||||
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
|
||||
|
||||
bottom_right:setup {
|
||||
nil,
|
||||
nil,
|
||||
prepare_widgets(widgets),
|
||||
layout = wibox.layout.align.horizontal
|
||||
}
|
||||
end
|
|
@ -46,7 +46,7 @@ awful.screen.connect_for_each_screen(
|
|||
|
||||
require("crylia_bar.left_bar")(s, { s.layoutlist, s.systray, s.taglist })
|
||||
require("crylia_bar.center_bar")(s, { s.tasklist })
|
||||
require("crylia_bar.right_bar")(s, { s.mpris, s.audio, s.date, s.clock, s.powerbutton })
|
||||
require("crylia_bar.right_bar")(s, { s.audio, s.date, s.clock, s.powerbutton })
|
||||
--require("crylia_bar.dock")(s, user_vars.dock_programs)
|
||||
end
|
||||
|
||||
|
@ -61,6 +61,7 @@ awful.screen.connect_for_each_screen(
|
|||
require("crylia_bar.left_bar")(s, { s.layoutlist, s.taglist })
|
||||
require("crylia_bar.center_bar")(s, { s.tasklist })
|
||||
require("crylia_bar.right_bar")(s, { s.gpu_temp, s.cpu_temp, s.ram_info, s.kblayout, s.bluetooth, s.network, s.clock, s.powerbutton })
|
||||
require("crylia_bar.bottom_right_bar")(s, { s.mpris })
|
||||
end
|
||||
end
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue