summaryrefslogtreecommitdiff
path: root/dwm/Scripts/mic.sh
diff options
context:
space:
mode:
Diffstat (limited to 'dwm/Scripts/mic.sh')
-rw-r--r--dwm/Scripts/mic.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/dwm/Scripts/mic.sh b/dwm/Scripts/mic.sh
new file mode 100644
index 0000000..78afaa8
--- /dev/null
+++ b/dwm/Scripts/mic.sh
@@ -0,0 +1,19 @@
+PIDFILE=/tmp/statMic.pid
+STATUSFILE=/tmp/dsbAMic
+
+kill `cat $PIDFILE`
+if [ $? -eq 0 ]; then
+ echo "Shutting down"
+ rm $STATUSFILE
+ exit
+fi
+
+echo $$ > $PIDFILE
+
+while true; do
+
+ MIC=$(amixer get Capture | grep "Front Left:" | sed 's/.*\[\(.*\)\].*/\1/')
+
+ echo "$MIC " > $STATUSFILE
+ sleep 1
+done