From: copycat-killer Date: Sat, 2 Apr 2016 09:20:04 +0000 (+0200) Subject: alsabar: check if mute is nil as well X-Git-Url: https://git.madduck.net/etc/awesome.git/commitdiff_plain/80075e34d5ba4186901d311c0f469aefe0449476 alsabar: check if mute is nil as well --- diff --git a/widgets/alsabar.lua b/widgets/alsabar.lua index 83e27b5..39bf394 100644 --- a/widgets/alsabar.lua +++ b/widgets/alsabar.lua @@ -127,7 +127,7 @@ local function worker(args) -- Capture mixer control state: [5%] ... ... [on] local volu, mute = string.match(mixer, "([%d]+)%%.*%[([%l]*)") - if (volu and tonumber(volu) ~= alsabar._current_level) or string.match(mute, "on") ~= alsabar._muted + if (volu and tonumber(volu) ~= alsabar._current_level) or (mute and string.match(mute, "on") ~= alsabar._muted) then alsabar._current_level = tonumber(volu) alsabar.bar:set_value(alsabar._current_level / 100)