aboutsummaryrefslogtreecommitdiff
path: root/vlm
diff options
context:
space:
mode:
authorRunciter2024-05-25 07:47:22 +0800
committerRunciter2024-05-25 07:47:22 +0800
commitc45395cace17333a020532f6239869ea2c799016 (patch)
tree39e2ff046a14512ce9d8ff58ce587539886cc00d /vlm
parentab3ed370aea207ca16903b452170799919bec6ee (diff)
downloadsh-pulse-c45395cace17333a020532f6239869ea2c799016.tar.gz
Add volume increment setting capability.
M README Expanded. M vlm Add INC argument to increase and decrease sub-commands. Expand usage information output.
Diffstat (limited to 'vlm')
-rwxr-xr-xvlm19
1 files changed, 16 insertions, 3 deletions
diff --git a/vlm b/vlm
index b4b279b..fe62be4 100755
--- a/vlm
+++ b/vlm
@@ -45,10 +45,20 @@ fi
case "$1" in
increase)
- pactl set-sink-volume ${SINKS[$IS]} "+5%"
+ if test "x$2" = "x"
+ then
+ pactl set-sink-volume ${SINKS[$IS]} "+5%"
+ else
+ pactl set-sink-volume ${SINKS[$IS]} $2
+ fi
;;
decrease)
- pactl set-sink-volume ${SINKS[$IS]} "-5%"
+ if test "x$2" = "x"
+ then
+ pactl set-sink-volume ${SINKS[$IS]} "-5%"
+ else
+ pactl set-sink-volume ${SINKS[$IS]} $2
+ fi
;;
togglemute)
pactl set-sink-mute ${SINKS[$IS]} toggle
@@ -67,7 +77,10 @@ case "$1" in
done
;;
*)
- echo "Usage: /usr/local/bin/pavolctrl {increase|decrease|togglemute|nextsink}"
+ echo "Usage: vlm {increase [INC]|decrease [INC]|togglemute|nextsink}"
+ echo " Volume increment INC is given as is to pactl."
+ echo " Default INC is +5% for increase, -5% for decrease."
+ echo " nextsink cycles audio outputs e.g. sound cards, usb, ..."
exit 2
;;
esac