blob: 751ce201303dec5bf81629d58568142ee45955a8 (
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
25
26
27
28
29
30
31
32
33
34
35
36
|
#!/bin/sh
# Pulseaudio or Alsa audio binds
case $1 in
"+")
if [ -f /usr/bin/pulsemixer ]; then
pulsemixer --change-volume +1
elif
[ -f /usr/bin/amixer ]; then
amixer set Master 1%+
fi
;;
"-")
if [ -f /usr/bin/pulsemixer ]; then
pulsemixer --change-volume -1
elif
[ -f /usr/bin/amixer ]; then
amixer set Master 1%-
fi
;;
t)
if [ -f /usr/bin/pulsemixer ]; then
pulsemixer --toggle-mute
elif
[ -f /usr/bin/amixer ]; then
amixer set Master toggle
fi
;;
m)
if [ -f /usr/bin/pacmd ]; then
pacmd list-sources | grep -oP 'index: \d+' | awk '{ print $2 }' | xargs -I {} pactl set-source-mute {} toggle
elif
[ -f /usr/bin/amixer ]; then
amixer set Capture toggle
fi
esac
|