From 53ea962bb51e28fd35d0ecc0d8e036d8df200a44 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Sat, 11 Apr 2009 21:39:46 +0200 Subject: small script to mute processes using oss --- oss-mute-proc.sh | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 oss-mute-proc.sh (limited to 'oss-mute-proc.sh') 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 +# +# 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 -- cgit v1.2.3-24-g4f1b