Added allmixer.sh - wrapper that call amixer command for all cards in ALSA system
authorHarvie <tomas@mudrunka.cz>
Mon, 9 May 2011 17:42:43 +0000 (19:42 +0200)
committerHarvie <tomas@mudrunka.cz>
Mon, 9 May 2011 17:42:43 +0000 (19:42 +0200)
bash/allmixer.sh [new file with mode: 0755]

diff --git a/bash/allmixer.sh b/bash/allmixer.sh
new file mode 100755 (executable)
index 0000000..7812cfa
--- /dev/null
@@ -0,0 +1,15 @@
+#!/bin/sh
+# call amixer for all cards in ALSA
+# (I am calling this from XFCE keyboard shortcuts to set volume globally)
+#
+# Usage examples:
+# ./allmixer.sh sset PCM 10%+
+# ./allmixer.sh sset PCM 10%-
+
+export LANG=C
+for i in {0..99}; do
+       cmd="amixer -c$i $@"
+       echo === $cmd ===
+       $cmd 2>&1 | grep 'Invalid card number' && break
+done;
+echo DONE
This page took 0.201333 seconds and 4 git commands to generate.