From 4952a2210b3e7c8fbe063da1947ff47ce7469afb Mon Sep 17 00:00:00 2001 From: elParaguayo Date: Thu, 13 Jan 2022 15:09:40 +0000 Subject: [PATCH] Fix regex bug in ALSAWidget Where amixer includes decibel levels in the output, the current regex will fail and so no volume will be recognised. This PR fixes that by making the regex less strict. Fixes #33 --- qtile_extras/widget/alsavolumecontrol.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qtile_extras/widget/alsavolumecontrol.py b/qtile_extras/widget/alsavolumecontrol.py index 04eaac71..cbade6e8 100644 --- a/qtile_extras/widget/alsavolumecontrol.py +++ b/qtile_extras/widget/alsavolumecontrol.py @@ -6,7 +6,7 @@ from libqtile.log_utils import logger from libqtile.widget import base -RE_VOL = re.compile(r"Playback\s[0-9]+\s\[([0-9]+)%\]\s\[(on|off)\]") +RE_VOL = re.compile(r"Playback\s[0-9]+\s\[([0-9]+)%\].*\[(on|off)\]") class ALSAWidget(base._Widget, base.PaddingMixin, base.MarginMixin):