X-Git-Url: https://git.madduck.net/etc/awesome.git/blobdiff_plain/eb8cec907a50f3fd6df4b14ae10b910444017f92..19ea09feadacb8b67d5c0900224259aa01c0c71b:/widgets/alsa.lua?ds=inline diff --git a/widgets/alsa.lua b/widgets/alsa.lua index 8571ec6..887f398 100644 --- a/widgets/alsa.lua +++ b/widgets/alsa.lua @@ -26,9 +26,9 @@ local function worker(args) local channel = args.channel or "Master" local settings = args.settings or function() end - widget = wibox.widget.textbox('') + alsa.widget = wibox.widget.textbox('') - function update() + function alsa.update() local f = io.popen('amixer get ' .. channel) local mixer = f:read("*all") f:close() @@ -56,11 +56,9 @@ local function worker(args) settings() end - newtimer("alsa", timeout, update) + newtimer("alsa", timeout, alsa.update) - output = { widget = widget, notify = update } - - return setmetatable(output, { __index = output.widget }) + return setmetatable(alsa, { __index = alsa.widget }) end return setmetatable(alsa, { __call = function(_, ...) return worker(...) end })