From 96bc496f36e479fd7db0dab017a2339a6051171f Mon Sep 17 00:00:00 2001 From: Julian T Date: Sun, 28 Apr 2019 14:30:07 +0200 Subject: Added status scripts --- dwm/Scripts/mic.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 dwm/Scripts/mic.sh (limited to 'dwm/Scripts/mic.sh') 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 -- cgit v1.2.3