Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix volume_status for default source with pamixer #2240

Merged
merged 1 commit into from
Mar 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading