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

pactl: Older versions of pactl do not have get-sink-* commands #390

Open
shuber2 opened this issue Jan 24, 2023 · 2 comments
Open

pactl: Older versions of pactl do not have get-sink-* commands #390

shuber2 opened this issue Jan 24, 2023 · 2 comments

Comments

@shuber2
Copy link
Contributor

shuber2 commented Jan 24, 2023

The pactl-widget uses pactl commands get-sink-{volume,mute}, which are not provided by older pactl version, like the one in current Debian bullseye.

pactl list or pactl list sinks could be alternatives.

shuber2 added a commit to shuber2/awesome-wm-widgets that referenced this issue Jan 25, 2023
Older versions of pactl, like the one shipped by Debian Bullseye, do not
provide the get-* commands, like get-sink-volume or get-sink-mute. Work
around them by relying on `pactl list` and `pactl info` only.

This commit increases code complexity significantly and reimplementing
pactl-logic in lua impairs performance compared to a modern pactl, where
this workaround would not be needed.

Fixes issue streetturtle#390.
@shuber2
Copy link
Contributor Author

shuber2 commented Jan 25, 2023

I have implemented a first proof-of-concept that would avoid calling the corresponding commands above. Comments are welcome.

shuber2 added a commit to shuber2/awesome-wm-widgets that referenced this issue Jan 25, 2023
Older versions of pactl, like the one shipped by Debian Bullseye, do not
provide the get-* commands, like get-sink-volume or get-sink-mute. Work
around them by providing a wrapper script for pactl that provides those
commands.

Fixes issue streetturtle#390.
@shuber2
Copy link
Contributor Author

shuber2 commented Jan 25, 2023

I have pushed another approach through a wrapper script. The advantage of this approach is that it only fixes the issue for those with an old pactl. Newer versions of pactl will be shipped moderately soon, so this wrapper script as a temporary measure seems to be reasonable.

Comments are welcome.

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

No branches or pull requests

1 participant