aboutsummaryrefslogtreecommitdiffstats
path: root/volumecontrol
blob: f290a4371b87731062e11ec7a2f473981d5de037 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/env bash

if [[ -n "$2" ]]; then
	step=$2
else
	step=5
fi

case $1 in
	lower)
		pactl set-sink-mute 1 false
		pactl set-sink-volume 1 -"$step"%
		;;
	raise)
		pactl set-sink-mute 1 false
		pactl set-sink-volume 1 +"$step"%
		;;
	mute)
		pactl set-sink-mute 1 toggle
		;;
	mute-mic)
		pactl set-source-mute 2 toggle
		;;
esac