From 8e85eaa0189278badc936afe23b59f7024f282a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adamczyk=20B=C5=82a=C5=BCej?= Date: Mon, 25 Jul 2022 09:12:42 +0200 Subject: [PATCH] Fixed a bug in pulseaudio when changing source/sink, e.g. (dis)connecting bluetooth headset. --- bumblebee_status/modules/core/pulseaudio.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bumblebee_status/modules/core/pulseaudio.py b/bumblebee_status/modules/core/pulseaudio.py index 906e1dd..98ec4d4 100644 --- a/bumblebee_status/modules/core/pulseaudio.py +++ b/bumblebee_status/modules/core/pulseaudio.py @@ -146,9 +146,12 @@ class Module(core.module.Module): m = re.search(r"mono:.*\s*\/\s*(\d+)%", line) if m: self._mono = m.group(1) + self._left = 0 + self._right = 0 else: m = re.search(r"left:.*\s*\/\s*(\d+)%.*right:.*\s*\/\s*(\d+)%", line) if m: + self._mono = 0 self._left = m.group(1) self._right = m.group(2)