2021-05-11 21:53:13 -05:00
|
|
|
#!/bin/sh
|
|
|
|
|
2022-11-27 11:04:53 -06:00
|
|
|
pulse=$(pgrep -c pulseaudio)
|
2022-06-18 16:34:35 -05:00
|
|
|
|
|
|
|
[ "$1" = "inc" ] && sign="+"
|
|
|
|
[ "$1" = "dec" ] && sign="-"
|
|
|
|
|
|
|
|
[ "$#" -eq 0 ] && exit 1
|
|
|
|
|
2022-11-27 11:04:53 -06:00
|
|
|
if [ "$pulse" -eq 1 ]; then
|
|
|
|
for SINK in $(pacmd list-sinks | grep 'index:' | cut -b12-)
|
2022-06-18 16:34:35 -05:00
|
|
|
do
|
2022-11-27 11:04:53 -06:00
|
|
|
pactl set-sink-volume "$SINK" "${sign}5%"
|
2022-06-18 16:34:35 -05:00
|
|
|
done
|
|
|
|
else
|
|
|
|
amixer -c 0 set Master "5%${sign}"
|
|
|
|
fi
|
|
|
|
|
2022-07-04 02:00:59 -05:00
|
|
|
killall -12 status
|