From: Harvie Date: Mon, 9 May 2011 17:42:43 +0000 (+0200) Subject: Added allmixer.sh - wrapper that call amixer command for all cards in ALSA system X-Git-Url: https://git.harvie.cz/?a=commitdiff_plain;h=01d8dabc060fcd5cb18c8282d16011e6bf17bee4;p=mirrors%2FPrograms.git Added allmixer.sh - wrapper that call amixer command for all cards in ALSA system --- diff --git a/bash/allmixer.sh b/bash/allmixer.sh new file mode 100755 index 0000000..7812cfa --- /dev/null +++ b/bash/allmixer.sh @@ -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