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