Skip to content

Commit

Permalink
volume_status module: pamixer: Use default device if none specified
Browse files Browse the repository at this point in the history
Not specifying the device should use whatever pamixer thinks is the default.
Using 0 might not be always the default, especially because the default (or
whatever pamixer thinks is the default) can change at runtime.
  • Loading branch information
syyyr committed Jan 15, 2024
1 parent 89b5e8e commit ce83e1b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion py3status/modules/volume_status.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ 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 or "0"]
self.cmd = ["pamixer", "--allow-boost"] + ([is_input, self.device] if self.device else [])

def get_volume(self):
try:
Expand Down

0 comments on commit ce83e1b

Please sign in to comment.