mirror of
https://github.com/lcpz/awesome-copycats.git
synced 2026-03-23 05:55:12 +00:00
alsa vol perc infobubble
This commit is contained in:
parent
987789f8c8
commit
9c2151f95f
|
|
@ -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()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue