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: A new volume widget using pactl only #386

Merged
merged 1 commit into from
Jan 18, 2023

Conversation

shuber2
Copy link
Contributor

@shuber2 shuber2 commented Jan 1, 2023

Add a new volume widget that is using pactl only for controlling volume and selecting sources and sinks. It therefore works with PulseAudio or PipeWire as backend, unlike the original Volume widget.

The code is split as follows:

  • volume.lua contains the UI logic
  • pactl.lua contains the pactl interfacing and output parsing
  • utils.lua contains some shared helper routines

It is heavily based on the original Volume code and supports the same configuration options and uses the same widget code.

@DeltaCircuit
Copy link

Just in time, as I was struggling with the same 😁 thanks a ton @shuber2. works like a charm!

A suggestion: I think it's better to pass a false as a second param to awful.spawn so that we won't get a loading spinner cursor (disable startup notifications)

@shuber2
Copy link
Contributor Author

shuber2 commented Jan 3, 2023

A suggestion: I think it's better to pass a false as a second param to awful.spawn so that we won't get a loading spinner cursor (disable startup notifications)

Great, thank you – implemented! (In pactl.lua; not for spawning mixer_cmd in volume.lua, because here it seems justified.)

@shuber2
Copy link
Contributor Author

shuber2 commented Jan 4, 2023

Made another change to fix showing the active port in the right-click information widget.

@rperce
Copy link

rperce commented Jan 16, 2023

Just installed this and it appears to be working perfectly! Thanks so much for the branch <3

pactl-widget/volume.lua Outdated Show resolved Hide resolved
pactl-widget/pactl.lua Outdated Show resolved Hide resolved
Add a new volume widget that is using pactl only for controlling volume
and selecting sources and sinks. It therefore works with PulseAudio or
PipeWire as backend, unlike the original Volume widget.

The code is split as follows:
  - volume.lua contains the UI logic
  - pactl.lua contains the pactl interfacing and output parsing
  - utils.lua contains some shared helper routines

It is heavily based on the original Volume code and supports the same
configuration options and uses the same widget code.
@streetturtle streetturtle merged commit a3f4a07 into streetturtle:master Jan 18, 2023
@shuber2 shuber2 deleted the pactl-widget branch January 19, 2023 16:21
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.

None yet

4 participants