X-Git-Url: https://git.madduck.net/etc/awesome.git/blobdiff_plain/f7aa28919588d307083b4b5b1c010f26cbc63cde..4a29739e79486a5003218341a6bd10fa5df4cb8b:/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)