sends amixer commands then bumps i3status mhoward-lt

Sun, 08 Jun 2014 04:06:07 -0400

author
Meredith Howard <mhoward@roomag.org>
date
Sun, 08 Jun 2014 04:06:07 -0400
branch
mhoward-lt
changeset 38
89149f81e6d7
parent 37
8518a581c36d
child 39
be664145f2fa

sends amixer commands then bumps i3status

.i3/volume_ctrl file | annotate | diff | comparison | revisions
new file mode 100755
--- /dev/null
+++ b/.i3/volume_ctrl
@@ -0,0 +1,14 @@
+#!/usr/bin/env ruby
+
+cmd = ARGV.shift
+
+if cmd == 'up'
+  system 'amixer -q set Master 5%+ unmute'
+elsif cmd == 'down'
+  system 'amixer -q set Master 5%- unmute'
+elsif cmd == 'mute'
+  system 'amixer -q set Master toggle'
+end
+
+# nudge i3stats for an update
+system 'killall -USR1 i3status'

mercurial