I want to read out the volume level I can set with
pactl set-sink-volume $SINK $VOLUME
Is there an easy way to do that? As easy as the hypothetical
pactl get-sink-volume $SINK
(What I'm trying to do? I use pactl to set volume and it lets me set the volume higher than 100% which is a bad idea (sound quality goes down), so I'm thinking about writing a small script that will not go over 100%. Read it out. Over some threshold? Set to 100%. Below? add 1%. If there is another way to do that, great, tell me! The cleanest solution would probably to tell pulse to just stop at 100%. But the original question remains, there must be some way..)
I am on Debian if that makes any difference.
As of early 2021, it seems like work is underway to implement this feature in pactl. Thanks to Klaas van Schelven for pointing this out.
It seems there is now (late 2022) a
pactl get-sink-volume command.