Skip to content

Commit

Permalink
Fix regex bug in ALSAWidget
Browse files Browse the repository at this point in the history
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
  • Loading branch information
elParaguayo committed Jan 13, 2022
1 parent 297df6d commit 4952a22
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion qtile_extras/widget/alsavolumecontrol.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 4952a22

Please sign in to comment.