1
0
Fork 0
mirror of https://github.com/lcpz/awesome-copycats.git synced 2026-03-23 14:05:11 +00:00

alsa vol perc infobubble

This commit is contained in:
Toma Adrian Ionut 2022-10-02 17:08:21 +03:00
parent 987789f8c8
commit 9c2151f95f

View file

@ -187,6 +187,18 @@ local bat = lain.widget.bat({
-- ALSA volume -- ALSA volume
local volicon = wibox.widget.imagebox() local volicon = wibox.widget.imagebox()
local battooltip = awful.tooltip({
objects = {volicon},
margin_leftright = dpi(15),
margin_topbottom = dpi(12)
})
battooltip.wibox.fg = "#fcfbf7"
battooltip.wibox.widget.bg = "#404040"
battooltip.textbox.font = theme.font
battooltip.timeout = 0
battooltip:set_shape(function(cr, width, height)
gears.shape.infobubble(cr, width, height, corner_radius, arrow_size, 4)
end)
theme.volume = lain.widget.alsabar({ theme.volume = lain.widget.alsabar({
-- togglechannel = "IEC958,3", -- togglechannel = "IEC958,3",
notification_preset = { notification_preset = {
@ -211,6 +223,7 @@ theme.volume = lain.widget.alsabar({
end end
volicon:set_image(theme[index]) volicon:set_image(theme[index])
battooltip:set_markup(string.format("\n%s%%", perc))
end end
}) })
volicon:buttons(my_table.join(awful.button({}, 1, function() volicon:buttons(my_table.join(awful.button({}, 1, function()