spotify-connect-web icon indicating copy to clipboard operation
spotify-connect-web copied to clipboard

Volume control from bash?

Open tatoosh opened this issue 7 years ago • 1 comments

Hello,

is there a way to volume control from a bash script like curl with port 4000? Maybe you have a snippet for me to increase or decrease volume!?

Thx

tatoosh avatar Jan 24 '18 13:01 tatoosh

#!/bin/bash VOL=3 if [ $1 = '+' ] then amixer set PCM -- $[$(amixer get PCM|grep -o [0-9]*%|sed 's/%//')+${VOL}]%

elif [ $1 = '-' ] then amixer set PCM -- $[$(amixer get PCM|grep -o [0-9]%|sed 's/%//')-${VOL}]% elif [[ $1 =~ [gG][eE][tT] ]] then VOLLVL=$(amixer get PCM | grep -E '%' | awk '{print $4, $5}') echo "Volume level = ${VOLLVL}" else echo "Bad input parameter (+/-/GET)" fi

This could be solution, when you want to controll volume from bash. I'm using Raspberry SSH android app and I'm using this script for it.

dusatvoj avatar Feb 22 '18 22:02 dusatvoj