From 9c2151f95fe43917062e676aa052f3a283a857e8 Mon Sep 17 00:00:00 2001 From: Toma Adrian Ionut Date: Sun, 2 Oct 2022 17:08:21 +0300 Subject: [PATCH] alsa vol perc infobubble --- themes/vertex/theme.lua | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/themes/vertex/theme.lua b/themes/vertex/theme.lua index a5e03b9..4e1865d 100644 --- a/themes/vertex/theme.lua +++ b/themes/vertex/theme.lua @@ -187,6 +187,18 @@ local bat = lain.widget.bat({ -- ALSA volume 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({ -- togglechannel = "IEC958,3", notification_preset = { @@ -211,6 +223,7 @@ theme.volume = lain.widget.alsabar({ end volicon:set_image(theme[index]) + battooltip:set_markup(string.format("\n%s%%", perc)) end }) volicon:buttons(my_table.join(awful.button({}, 1, function()