summaryrefslogtreecommitdiffstats
path: root/.local/bin
diff options
context:
space:
mode:
authorLuke Smith <luke@lukesmith.xyz>2020-03-22 09:41:50 -0400
committerLuke Smith <luke@lukesmith.xyz>2020-03-22 09:41:50 -0400
commit1dc42a4f86cc1eeb92d094d92a5e1ae145010ff7 (patch)
tree72715bef5eac41571bc4da1036267be645f2ca2d /.local/bin
parent248b6dd3d2383be17a5533e532c0322ae9960c13 (diff)
downloadeibhear-1dc42a4f86cc1eeb92d094d92a5e1ae145010ff7.tar.gz
eibhear-1dc42a4f86cc1eeb92d094d92a5e1ae145010ff7.tar.zst
eibhear-1dc42a4f86cc1eeb92d094d92a5e1ae145010ff7.zip
lmc readded
Diffstat (limited to '.local/bin')
-rwxr-xr-x.local/bin/lmc27
1 files changed, 27 insertions, 0 deletions
diff --git a/.local/bin/lmc b/.local/bin/lmc
new file mode 100755
index 0000000..bbe99a5
--- /dev/null
+++ b/.local/bin/lmc
@@ -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:?}" &