[module/amixer] Add on/off mute check

This commit is contained in:
susmus 2018-06-09 22:22:16 +02:00
parent 30b542906c
commit e8970f1bd4

View file

@ -21,7 +21,7 @@ class Module(bumblebee.engine.Module):
m = re.search(r'([\d]+)\%', self._level) m = re.search(r'([\d]+)\%', self._level)
self._muted = True self._muted = True
if m: if m:
if m.group(1) != "0": if m.group(1) != "0" and "[on]" in self._level:
self._muted = False self._muted = False
return "{}%".format(m.group(1)) return "{}%".format(m.group(1))
else: else: