Merge pull request #270 from susmus/master

[module/amixer] Add on/off mute check
This commit is contained in:
tobi-wan-kenobi 2018-06-10 10:32:54 +02:00 committed by GitHub
commit 01f248cdcd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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: