summaryrefslogtreecommitdiff
path: root/vol
diff options
context:
space:
mode:
Diffstat (limited to 'vol')
-rwxr-xr-xvol13
1 files changed, 13 insertions, 0 deletions
diff --git a/vol b/vol
new file mode 100755
index 0000000..5ff7b12
--- /dev/null
+++ b/vol
@@ -0,0 +1,13 @@
+#!/usr/bin/env sh
+
+# A small volume control script for the laptop
+
+cmd="amixer set Master"
+fle=$HOME/.vol
+case "$1" in
+ "up") $cmd 2%+;;
+ "down") $cmd 2%-;;
+ *) $cmd toggle;;
+esac | grep \% | cut -d\ -f 6,8 | tr -d '[]' > $fle
+
+ratpoison -c "echo Volume: `cat $fle`"