Conversation
This patch adds the option of specifying a relative volume change, in the form of saying +10 or -10 to change the volume from current level. This allows using pa_volume for app-specific volume buttons. Due to quirks in getopt(), negative changes need to be specified like: pa_volume paplay -- -10
|
Thank you for the suggestion and the code. Having to use Addendum, yes, avoiding the need for "--" should be possible.
so adding a "+" at the beginning of |
|
Ahh, moving the +/- to a suffix is a great idea. I briefly looked into persuading getopt to accept -10 but I got the impression it was only possible for required parameters. Whichever way you prefer is fine with me. Edit: Let me know if you want me to submit an update or if you prefer to write it yourself. |
Yep, second to that, as I too am thinking that having to use So, shall we settle with: to specify a relative volume change (of +10 or -10 to change the volume from current level), as @zagor, if you OK with such notation, would you submit an update on top of this PR please? |
This patch adds the option of specifying a relative volume change, in
the form of saying +10 or -10 to change the volume from current level.
This allows using pa_volume for app-specific volume buttons.
Due to quirks in getopt(), negative changes need to be specified like:
pa_volume paplay -- -10
I had to butcher some asserts a bit, but I didn't want to rewrite them too much without your input.