diff --git a/bumblebee/modules/pulseaudio.py b/bumblebee/modules/pulseaudio.py index 0bf88f4..5cdbac3 100644 --- a/bumblebee/modules/pulseaudio.py +++ b/bumblebee/modules/pulseaudio.py @@ -30,9 +30,9 @@ class Module(bumblebee.engine.Module): channel = "sink" if self.name == "pasink" else "source" self._patterns = [ - { "expr": "Name:", "callback": (lambda line: False) }, - { "expr": "Mute:", "callback": (lambda line: self.mute(False if " no" in line.lower() else True)) }, - { "expr": "Volume:", "callback": self.getvolume }, + { "expr": "name:", "callback": (lambda line: False) }, + { "expr": "muted:", "callback": (lambda line: self.mute(False if " no" in line.lower() else True)) }, + { "expr": "volume:", "callback": self.getvolume }, ] engine.input.register_callback(self, button=bumblebee.input.RIGHT_MOUSE, cmd="pavucontrol") @@ -64,8 +64,8 @@ class Module(bumblebee.engine.Module): return True def _default_device(self): - output = bumblebee.util.execute("pactl info") - pattern = "Default Sink: " if self.name == "pasink" else "Default Source: " + output = bumblebee.util.execute("pacmd stat") + pattern = "Default sink name: " if self.name == "pasink" else "Default source name: " for line in output.split("\n"): if line.startswith(pattern): return line.replace(pattern, "") @@ -84,7 +84,7 @@ class Module(bumblebee.engine.Module): channel = "sinks" if self.name == "pasink" else "sources" device = self._default_device() - result = bumblebee.util.execute("pactl list {}".format(channel)) + result = bumblebee.util.execute("pacmd list-{}".format(channel)) found = False for line in result.split("\n"):