summaryrefslogtreecommitdiff
path: root/vol
diff options
context:
space:
mode:
authorTslil Clingman <hiato1@gmail.com>2015-06-17 21:59:14 +0200
committerTslil Clingman <hiato1@gmail.com>2015-06-17 21:59:14 +0200
commitaab74a4002f5154ee117bc38a2481be0ab710e1e (patch)
tree0ecbd29515e902c0e36b07f2363f2337db57cc20 /vol
parenteb393abbcd6c3913701fdb8f7919ae663cec1e04 (diff)
parent4b9bca8485bda63c9fdd90df0a4d5311c3fd7be8 (diff)
Merge branch 'master' of github.com:tslilc/scripts
Diffstat (limited to 'vol')
-rwxr-xr-xvol17
1 files changed, 17 insertions, 0 deletions
diff --git a/vol b/vol
new file mode 100755
index 0000000..778abf9
--- /dev/null
+++ b/vol
@@ -0,0 +1,17 @@
+#!/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
+
+for c in "set bargravity ne" "echo Volume: `cat $fle`" "set bargravity c"; do
+ ratpoison -c "$c"
+ echo $c
+done
+