summaryrefslogtreecommitdiff
path: root/dot/local/bin
diff options
context:
space:
mode:
Diffstat (limited to 'dot/local/bin')
-rwxr-xr-xdot/local/bin/amixer-enable-mic8
1 files changed, 6 insertions, 2 deletions
diff --git a/dot/local/bin/amixer-enable-mic b/dot/local/bin/amixer-enable-mic
index cc488fd..9362b88 100755
--- a/dot/local/bin/amixer-enable-mic
+++ b/dot/local/bin/amixer-enable-mic
@@ -1,6 +1,7 @@
1#!/bin/sh 1#!/bin/sh
2 2
3SETME=${1:-100%} 3SETME=${1:-100%}
4SETME_BOOST=${2:-50%}
4 5
5enable_recording() 6enable_recording()
6{ 7{
@@ -8,8 +9,11 @@ enable_recording()
8 amixer -D "$DEV" controls | ( 9 amixer -D "$DEV" controls | (
9 IFS=, 10 IFS=,
10 while read a b c _; do 11 while read a b c _; do
11 case "${c#name=}" in *Capture*|*Boost*) 12 case "${c#name=}" in
12 amixer -D "$DEV" cset "$a,$b,$c" "$SETME";; 13 *Boost*)
14 amixer -D "$DEV" cset "$a,$b,$c" "$SETME_BOOST";;
15 *Capture*)
16 amixer -D "$DEV" cset "$a,$b,$c" "$SETME";;
13 esac 17 esac
14 done 18 done
15 ) 19 )