volume.update() does nothing
juacq97 opened this issue · comments
Juan Castro commented
- output of
awesome -v
:
awesome v4.3 (Too long)
• Compiled against Lua 5.3.5 (running with Lua 5.3)
• D-Bus support: ✔
• execinfo support: ✔
• xcb-randr version: 1.6
• LGI version: 0.9.2
-
output of
lua -v
: Lua 5.4.0 Copyright (C) 1994-2020 Lua.org, PUC-Rio -
Issue:
I use thelain.widget.pulse
widget to get a volume widget on my panel. I have this code:
local myvol = lain.widget.pulse {
settings = function()
vol = "Vol: " .. volume_now.left .. "%"
if volume_now.muted == "yes" then
vol = "Vol: mute"
end
widget:set_markup(vol)
end
and this on my keybindings:
awful.key({}, "XF86AudioLowerVolume",
function()
os.execute(string.format("pactl set-sink-volume %s +1%%", volume.device))
myvol.update()
end,
{description="Volume down", group="Apps"}),
-
expected behavior: When I press the
XF86AudioLowerVolume
button the widget should update instantly. I changetimeout = 0
but the CPU goes wild to 80% or more. -
Actual behaviour: The widget updates after a few seconds.
-
steps to reproduce the problem: Press the
XF86AudioLowerVolume
button. it happens the same with other buttons.
Juan Castro commented
Ok, solved, was the sxhkd
instanec I was runing