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

volume_status module: pamixer: Use default device if none specified #2228

Merged
merged 1 commit into from
Jan 17, 2024

Conversation

syyyr
Copy link
Contributor

@syyyr syyyr commented Jan 15, 2024

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.

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.
@ultrabug ultrabug merged commit 127c5e8 into ultrabug:master Jan 17, 2024
5 checks passed
@ultrabug
Copy link
Owner

Thanks!

Copy link
Contributor

@lasers lasers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FIXME

@@ -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 [])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I'm rusty. This doesn't respect device = 0.

-        self.cmd = ["pamixer", "--allow-boost"] + ([is_input, self.device] if self.device else [])
+        self.cmd = ["pamixer", "--allow-boost"] + ([is_input, self.device] if self.device is not None else [])

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants