X-Git-Url: https://git.madduck.net/etc/awesome.git/blobdiff_plain/17079866150227a7a12798ea97961b7f6370574b..fdf517503f5d52f0be7760777a7db855c1ede25c:/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)