smasher164 / pw-volume

Basic interface to PipeWire volume controls
MIT License
76 stars 10 forks source link

Compatibility with pulseaudio-ctl #6

Open somini opened 2 years ago

somini commented 2 years ago

https://github.com/graysky2/pulseaudio-ctl/

This is a similar program that exists for pulseaudio control. Since these tools live and die by the interface, I would request this interface to be implemented.

/usr/bin/pulseaudio-ctl mute        ==>  Toggle status of mute
/usr/bin/pulseaudio-ctl mute-input  ==>  Toggle status of mute for mic
/usr/bin/pulseaudio-ctl up          ==>  Increase vol by 5 %
/usr/bin/pulseaudio-ctl up 25       ==>  Increase vol by 25 %
/usr/bin/pulseaudio-ctl down        ==>  Decrease vol by 5 %
/usr/bin/pulseaudio-ctl down 50     ==>  Decrease vol by 50 %
/usr/bin/pulseaudio-ctl set 40      ==>  Set vol to 40%
/usr/bin/pulseaudio-ctl atmost 30   ==>  Set vol to 30% if current higher than that

From what I can tell, these are mostly aliases, there are only one crucial feature to implement:

somini commented 2 years ago

There's also this issue to implement the opposite of this, pipewire support on pulseaudio-ctl:

https://github.com/graysky2/pulseaudio-ctl/issues/68

smasher164 commented 2 years ago

Thanks for filing this. I didn't think about maintaining compatibility with pulseaudio-ctl.

Input volume control is something that should definitely be added. The default input sink is something that can be retrieved via pw-dump, so it should be the same sort of logic.

Atmost is interesting. Is that something people actually use?

somini commented 2 years ago

Atmost is interesting. Is that something people actually use?

I don't use it personally, but it might be very useful for automation. For example, limiting the audio level when connecting new devices, or when on calls?

somini commented 1 year ago

FYI, looks like WirePlumber "solved" this issue by shipping a program that does basically the same thing:

https://wiki.archlinux.org/title/WirePlumber#Keyboard_volume_control

smasher164 commented 1 year ago

Maybe I should redirect users to use wpctl instead?

somini commented 1 year ago

Yeah, I think WirePlumber and PipeWire are almost sister projects, it's the default session manager.

eternal-sorrow commented 4 months ago

Not everyone uses wireplumber with pipewire, please don't abandon this project.