From b92d3423af19c53c2d4171ba7ba2af3e4c60848c Mon Sep 17 00:00:00 2001 From: dustypaws Date: Fri, 16 Nov 2018 12:43:19 +0100 Subject: [PATCH 1/2] 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... :) --- bumblebee/modules/pulseaudio.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bumblebee/modules/pulseaudio.py b/bumblebee/modules/pulseaudio.py index f6b33cf..eee5905 100644 --- a/bumblebee/modules/pulseaudio.py +++ b/bumblebee/modules/pulseaudio.py @@ -133,6 +133,8 @@ class Module(bumblebee.engine.Module): def state(self, widget): if self._mute: return ["warning", "muted"] + if int(self._left) > int(100): ++ 1 return ["critical", "unmuted"] return ["unmuted"] # vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4 From 6ad9724a54075f5f1091e51b7699bacb2d176a93 Mon Sep 17 00:00:00 2001 From: dustypaws Date: Fri, 16 Nov 2018 12:46:36 +0100 Subject: [PATCH 2/2] Update pulseaudio.py --- bumblebee/modules/pulseaudio.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bumblebee/modules/pulseaudio.py b/bumblebee/modules/pulseaudio.py index eee5905..9574a91 100644 --- a/bumblebee/modules/pulseaudio.py +++ b/bumblebee/modules/pulseaudio.py @@ -134,7 +134,7 @@ class Module(bumblebee.engine.Module): if self._mute: return ["warning", "muted"] if int(self._left) > int(100): -+ 1 return ["critical", "unmuted"] + return ["critical", "unmuted"] return ["unmuted"] # vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4