Here’s a simple shell script I wrote for controlling PulseAudio volume from shell under Linux. It takes two parameters: up and down and sets volume for all sinks.
1 2 3 4 5 6 7 8 9 10 11 12 | #!/bin/bash OLDIFS=$IFS IFS=$'\n' for L in `pacmd dump | grep set-sink-volume`; do if [ $1 = "up" ]; then pacmd set-sink-volume `echo $L | awk '{print $2}'` `echo $L | awk '{print $3+5000}'` fi if [ $1 = "down" ]; then pacmd set-sink-volume `echo $L | awk '{print $2}'` `echo $L | awk '{print $3-5000}'` fi done IFS=$OLDIFS |
Trackback responses to this post
About me
I'm Nonoo. This is my blog about music, sounds, filmmaking, amateur radio, computers, programming, electronics and other things I'm obsessed with.
... »
Trackback URL
No comments yet.