alsabar: check if mute is nil as well
This commit is contained in:
parent
2967318ea5
commit
80075e34d5
1 changed files with 1 additions and 1 deletions
|
@ -127,7 +127,7 @@ local function worker(args)
|
||||||
-- Capture mixer control state: [5%] ... ... [on]
|
-- Capture mixer control state: [5%] ... ... [on]
|
||||||
local volu, mute = string.match(mixer, "([%d]+)%%.*%[([%l]*)")
|
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
|
then
|
||||||
alsabar._current_level = tonumber(volu)
|
alsabar._current_level = tonumber(volu)
|
||||||
alsabar.bar:set_value(alsabar._current_level / 100)
|
alsabar.bar:set_value(alsabar._current_level / 100)
|
||||||
|
|
Loading…
Add table
Reference in a new issue