Set state to critical if volume is set over 100%

..."warning" would suffice but eh!

Useful for headphone users. Or at least I think so... :)
This commit is contained in:
dustypaws 2018-11-16 12:43:19 +01:00 committed by GitHub
parent bc569a11af
commit b92d3423af
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -133,6 +133,8 @@ class Module(bumblebee.engine.Module):
def state(self, widget): def state(self, widget):
if self._mute: if self._mute:
return ["warning", "muted"] return ["warning", "muted"]
if int(self._left) > int(100):
+ 1 return ["critical", "unmuted"]
return ["unmuted"] return ["unmuted"]
# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4 # vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4