summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xoss-mute-proc.sh24
1 files changed, 24 insertions, 0 deletions
diff --git a/oss-mute-proc.sh b/oss-mute-proc.sh
new file mode 100755
index 0000000..37ebbf2
--- /dev/null
+++ b/oss-mute-proc.sh
@@ -0,0 +1,24 @@
+#!/bin/bash
+#----------------------------------------------------
+# Version: 0.1.0
+# Author: Florian "Bluewind" Pritz <f-p@gmx.at>
+#
+# Copyright (C) 2008-2009 Florian Pritz
+#
+# Licensed under GNU General Public License v3
+# (see COPYING for full license text)
+#
+#----------------------------------------------------
+# script to (un)mute processes using oss
+#----------------------------------------------------
+PROC="$1"
+
+VOLUME=$(cat "$HOME/.volume_$PROC")
+if [ -z "$VOLUME" ]; then
+ VOLUME=$(ossmix | grep "\"$PROC\"" | awk '{print $4}' | awk -F : '{print $1}')
+ ossmix $PROC 0
+ echo $VOLUME > "$HOME/.volume_$PROC"
+else
+ ossmix $PROC $VOLUME
+ echo "" > "$HOME/.volume_$PROC"
+fi