X-Git-Url: https://git.madduck.net/etc/awesome.git/blobdiff_plain/1574793252a5b5ac22734d9d7a26dd4f6869b72e..d3cf8f992b0a987122155e72f15ee286ad8f7965:/widgets/alsa.lua

diff --git a/widgets/alsa.lua b/widgets/alsa.lua
index a356892..91bf488 100644
--- a/widgets/alsa.lua
+++ b/widgets/alsa.lua
@@ -33,7 +33,7 @@ local function worker(args)
 
     function alsa.update()
         local f = assert(io.popen(string.format("%s get %s", alsa.cmd, alsa.channel)))
-        local mixer = f:read("*a")
+        local mixer = f:read("*all")
         f:close()
 
         volume_now = {}
@@ -60,7 +60,9 @@ local function worker(args)
         settings()
     end
 
-    newtimer("alsa", timeout, alsa.update)
+    timer_id = string.format("alsa-%s-%s", alsa.cmd, alsa.channel)
+
+    newtimer(timer_id, timeout, alsa.update)
 
     return setmetatable(alsa, { __index = alsa.widget })
 end