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

Replace pacmd calls with pactl to support Pipewire #818

Open
wants to merge 1 commit into
base: current
Choose a base branch
from

Conversation

EgZvor
Copy link
Contributor

@EgZvor EgZvor commented Jun 3, 2021

pacmd does not work with Pipewire, use pactl where possible instead

Fixes #810

`pacmd` does not work with Pipewire, use `pactl` where possible instead
# if line.startswith("set-default-sink"):
# default_sink = line.split()[1]
# if default_sink == self.current_sink:
# selected = self.format_selected
Copy link
Contributor

@hasB4K hasB4K Jan 20, 2022

Choose a reason for hiding this comment

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

I'm pretty sure that this issue can be easily be resolved with the following:

            selected = ""
            default_sink = subprocess.check_output("pactl get-default-sink".split()).strip()
            if default_sink == self.current_sink:
                selected = self.format_selected

Copy link
Contributor

Choose a reason for hiding this comment

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

I have tested with a full pulseaudio and a full pipewire setup, and this patch works.

pactl get-default-sink and pacmd dump | grep set-default-sink | awk '{print $2}' (the equivalent bash command of the current code) gives the same outputs on a full pulseaudio setup.

@hasB4K
Copy link
Contributor

hasB4K commented Jan 20, 2022

Thank you @EgZvor for this patch! I think this should be merged (with the small patch that I provided). It works perfectly for me.

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.

Support for pipewire
2 participants