arch: add setter for volume.sh
This commit is contained in:
parent
15958114cd
commit
318254623f
|
@ -2,16 +2,16 @@
|
|||
|
||||
if [[ $# == 0 ]]
|
||||
then
|
||||
echo "Usage: volume.sh [+|-|unmute|mute]"
|
||||
exit 1
|
||||
echo "$(amixer get Master | sed -n 's/^.*\[\([0-9]\+\)%.*$/\1/p' | uniq)"
|
||||
exit
|
||||
fi
|
||||
|
||||
COMMAND=$1
|
||||
case "$COMMAND" in
|
||||
[0-9]*) amixer set Master $COMMAND ;;
|
||||
[+-]) amixer set Master 10%$COMMAND ;;
|
||||
*mute) amixer set Master $COMMAND ;;
|
||||
*)
|
||||
echo "Invalid command"
|
||||
*) >&2 echo "Invalid command"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
|
Loading…
Reference in a new issue