Skip to content

Commit

Permalink
volume_status module: fix for default source with pamixer (#2240)
Browse files Browse the repository at this point in the history
  • Loading branch information
oceyral authored Mar 13, 2024
1 parent a0e4720 commit 878f07d
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions py3status/modules/volume_status.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,10 +171,13 @@ def toggle_mute(self):

class Pamixer(Audio):
def setup(self, parent):
is_input = "--source" if self.is_input else "--sink"
self.cmd = ["pamixer", "--allow-boost"] + (
[is_input, self.device] if self.device is not None else []
)
if self.device is not None:
dev_target = ["--source" if self.is_input else "--sink", self.device]
elif self.is_input:
dev_target = ["--default-source"]
else:
dev_target = []
self.cmd = ["pamixer", "--allow-boost"] + dev_target

def get_volume(self):
try:
Expand Down

0 comments on commit 878f07d

Please sign in to comment.