lmc readded

This commit is contained in:
Luke Smith
2020-03-22 09:41:50 -04:00
parent 248b6dd3d2
commit 1dc42a4f86
2 changed files with 39 additions and 12 deletions

27
.local/bin/lmc Executable file
View File

@@ -0,0 +1,27 @@
#!/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" ;}
else
toggle() { amixer sset Master toggle ;}
mute() { amixer sset Master mute ;}
up() { amixer sset Master "$NUM"%+ ;}
down() { amixer sset Master "$NUM"%- ;}
fi
case "$1" in
toggle) toggle ;;
mute) mute ;;
up) up ;;
down) down ;;
esac >/dev/null
pkill -RTMIN+10 "${STATUSBAR:?}" &