X-Git-Url: https://git.madduck.net/etc/awesome.git/blobdiff_plain/8af4a03c754fa1bcac24736633f1b3be8ce8888c..968b2eafa31c35c3a95dfc727c7403c972c4bb69:/widgets/alsabar.lua diff --git a/widgets/alsabar.lua b/widgets/alsabar.lua index d8f1731..90d3a0d 100644 --- a/widgets/alsabar.lua +++ b/widgets/alsabar.lua @@ -43,7 +43,7 @@ local alsabar = { font = beautiful.font:sub(beautiful.font:find(""), beautiful.font:find(" ")), font_size = "11", - color = beautiful.fg_focus, + color = beautiful.fg_normal, bar_size = 18 }, @@ -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)