utility-scripts/set_volume

10 lines
180 B
Plaintext
Raw Normal View History

2015-06-14 23:58:20 +00:00
#!/bin/dash
if [ -z "$1" ] || [ -n "$(echo $1|sed 's/[0-9]//g')" ]; then
echo "Usage: $0 <volume 0-100>"
exit
fi
pacmd set-sink-volume 0 $(($1 * 65536/100)) >/dev/null
exit $?