voidrice/.local/bin/lmc

31 lines
632 B
Text
Raw Normal View History

2020-03-22 13:41:50 +00:00
#!/bin/sh
NUM="${2:-5}"
# Uncomment the following line to use Pulseaudio.
# PULSE=true
if [ "$PULSE" ]; then
toggle() { pulsemixer --toggle-mute ;}
mute() { pulsemixer --mute ;}
up() { pulsemixer --change-volume +"$NUM" ;}
down() { pulsemixer --change-volume -"$NUM" ;}
2020-03-29 16:02:15 +00:00
control() { pulsemixer ;}
2020-03-22 13:41:50 +00:00
else
toggle() { amixer sset Master toggle ;}
mute() { amixer sset Master mute ;}
up() { amixer sset Master "$NUM"%+ ;}
down() { amixer sset Master "$NUM"%- ;}
2020-03-29 16:02:15 +00:00
control() { alsamixer ;}
2020-03-22 13:41:50 +00:00
fi
case "$1" in
toggle) toggle ;;
mute) mute ;;
up) up ;;
down) down ;;
2020-03-29 16:02:15 +00:00
control) control ;;
esac
2020-03-22 13:41:50 +00:00
pkill -RTMIN+10 "${STATUSBAR:?}" &