]> git.phdru.name Git - audio-cdr-video.git/commitdiff
Feat(audio/pa-volume): Set arbitrary volume master
authorOleg Broytman <phd@phdru.name>
Sun, 30 Mar 2025 22:25:34 +0000 (01:25 +0300)
committerOleg Broytman <phd@phdru.name>
Sun, 30 Mar 2025 22:25:34 +0000 (01:25 +0300)
audio/pa-volume

index bae54c5584e93abeb3ad35b17203ffaf1dc7ba0e..2c1e7d0e1d7fa828caef2341e5468d06f61599fb 100755 (executable)
@@ -24,6 +24,10 @@ then
    pactl set-sink-mute "$default_sink" 0
    exit
 fi
    pactl set-sink-mute "$default_sink" 0
    exit
 fi
+if [[ $1 == "set" ]]
+then
+   NEWVOL="$2"
+fi
 if [[ $NEWVOL -ge 0 && $NEWVOL -le 65540 ]] # Check to see if the volume is a valid number (65540 was needed in this case because of how I rounded the increment)
 then
    pactl set-sink-volume "$default_sink" $NEWVOL
 if [[ $NEWVOL -ge 0 && $NEWVOL -le 65540 ]] # Check to see if the volume is a valid number (65540 was needed in this case because of how I rounded the increment)
 then
    pactl set-sink-volume "$default_sink" $NEWVOL