alsabar: check if mute is nil as well

This commit is contained in:
copycat-killer 2016-04-02 11:20:04 +02:00
parent 2967318ea5
commit 80075e34d5
1 changed files with 1 additions and 1 deletions

View File

@ -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)