Skip to content

Commit

Permalink
feat(widgets): self.mute True/False for Volume widget
Browse files Browse the repository at this point in the history
  • Loading branch information
shyguyCreate committed Apr 28, 2024
1 parent 4be450e commit 59763c6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions libqtile/widget/volume.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def __init__(self, **config):
self.add_defaults(Volume.defaults)
self.surfaces = {}
self.volume = None
self.mute = 0
self.mute = False

self.add_callbacks(
{
Expand Down Expand Up @@ -217,13 +217,13 @@ def get_volume(self):

mixer_out = subprocess.getoutput(get_volume_cmd)
except subprocess.CalledProcessError:
return -1, 0
return -1, False

check_mute = mixer_out
if self.check_mute_command:
check_mute = subprocess.getoutput(self.check_mute_command)

mute = 1 if self.check_mute_string in check_mute else 0
mute = self.check_mute_string in check_mute

volgroups = re_vol.search(mixer_out)
if volgroups:
Expand Down

0 comments on commit 59763c6

Please sign in to comment.