From 878f07dffd498650024cbac2dd2941bacf29455c Mon Sep 17 00:00:00 2001 From: oceyral Date: Wed, 13 Mar 2024 10:59:03 +0000 Subject: [PATCH] volume_status module: fix for default source with pamixer (#2240) --- py3status/modules/volume_status.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/py3status/modules/volume_status.py b/py3status/modules/volume_status.py index 124f9ed1d7..8e18d5b52e 100644 --- a/py3status/modules/volume_status.py +++ b/py3status/modules/volume_status.py @@ -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: