From 01d8dabc060fcd5cb18c8282d16011e6bf17bee4 Mon Sep 17 00:00:00 2001 From: Harvie Date: Mon, 9 May 2011 19:42:43 +0200 Subject: [PATCH] Added allmixer.sh - wrapper that call amixer command for all cards in ALSA system --- bash/allmixer.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 bash/allmixer.sh 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 -- 2.30.2