X-Git-Url: https://git.madduck.net/etc/awesome.git/blobdiff_plain/03fdf984e93d81ed95945db51c83baf6c23e89e8..a274576cfd89c1475aa6b9149ad25fdd5cda1060:/widgets/alsa.lua?ds=sidebyside diff --git a/widgets/alsa.lua b/widgets/alsa.lua index 93c74cc..f73194b 100644 --- a/widgets/alsa.lua +++ b/widgets/alsa.lua @@ -16,9 +16,9 @@ local setmetatable = setmetatable -- ALSA volume -- lain.widgets.alsa -local alsa = helpers.make_widget_textbox() local function worker(args) + local alsa = { widget = wibox.widget.textbox() } local args = args or {} local timeout = args.timeout or 5 local settings = args.settings or function() end @@ -50,7 +50,7 @@ local function worker(args) helpers.newtimer(string.format("alsa-%s-%s", alsa.cmd, alsa.channel), timeout, alsa.update) - return setmetatable(alsa, { __index = alsa.widget }) + return alsa end -return setmetatable(alsa, { __call = function(_, ...) return worker(...) end }) +return setmetatable({}, { __call = function(_, ...) return worker(...) end })