X-Git-Url: https://git.madduck.net/etc/awesome.git/blobdiff_plain/c0deea25035a845907210f2a913099343a16162e..1555e239eb42953d6d16b04f09d4d19083fa5119:/widgets/pulseaudio.lua?ds=inline diff --git a/widgets/pulseaudio.lua b/widgets/pulseaudio.lua index f2d63d6..68d3066 100644 --- a/widgets/pulseaudio.lua +++ b/widgets/pulseaudio.lua @@ -25,6 +25,7 @@ local function worker(args) local scallback = args.scallback pulseaudio.cmd = args.cmd or "pacmd list-sinks | sed -n -e '0,/*/d' -e '/base volume/d' -e '/volume:/p' -e '/muted:/p' -e '/device\\.string/p'" + pulseaudio.widget = wibox.widget.textbox() function pulseaudio.update() @@ -52,9 +53,9 @@ local function worker(args) end) end - helpers.newtimer(string.format("pulseaudio-%s", timeout), timeout, pulseaudio.update) + helpers.newtimer("pulseaudio", timeout, pulseaudio.update) - return setmetatable(pulseaudio, { __index = pulseaudio.widget }) + return pulseaudio end return setmetatable(pulseaudio, { __call = function(_, ...) return worker(...) end })