X-Git-Url: https://git.madduck.net/etc/awesome.git/blobdiff_plain/8af4a03c754fa1bcac24736633f1b3be8ce8888c..aacefc209e47c019f69a8234770e79b7c08e0b29:/widgets/alsabar.lua diff --git a/widgets/alsabar.lua b/widgets/alsabar.lua index d8f1731..b0bf150 100644 --- a/widgets/alsabar.lua +++ b/widgets/alsabar.lua @@ -92,6 +92,7 @@ end local function worker(args) local args = args or {} local timeout = args.timeout or 4 + local settings = args.settings or function() end local width = args.width or 63 local height = args.heigth or 1 local ticks = args.ticks or true @@ -142,6 +143,11 @@ local function worker(args) alsabar.tooltip:set_text(string.format(" %s:%s ", alsabar.channel, volu)) alsabar.bar:set_color(alsabar.colors.unmute) end + + volume_now = {} + volume_now.level = tonumber(volu) + volume_now.status = mute + settings() end newtimer("alsabar", timeout, alsabar.update)