From bbfb8eb1eca07705a8b5fc71c25de3cbbbcd0e38 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Tue, 14 Apr 2009 19:21:26 +0200 Subject: moved oss-mute-proc voolume file to /tmp --- oss-mute-proc.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'oss-mute-proc.sh') diff --git a/oss-mute-proc.sh b/oss-mute-proc.sh index 37ebbf2..bad5b6e 100755 --- a/oss-mute-proc.sh +++ b/oss-mute-proc.sh @@ -1,6 +1,6 @@ #!/bin/bash #---------------------------------------------------- -# Version: 0.1.0 +# Version: 0.1.1 # Author: Florian "Bluewind" Pritz # # Copyright (C) 2008-2009 Florian Pritz @@ -12,13 +12,14 @@ # script to (un)mute processes using oss #---------------------------------------------------- PROC="$1" +VOLFILE="/tmp/${USER}_volume_${PROC}" -VOLUME=$(cat "$HOME/.volume_$PROC") +VOLUME=$(cat "$VOLFILE" 2> /dev/null) if [ -z "$VOLUME" ]; then VOLUME=$(ossmix | grep "\"$PROC\"" | awk '{print $4}' | awk -F : '{print $1}') ossmix $PROC 0 - echo $VOLUME > "$HOME/.volume_$PROC" + echo $VOLUME > "$VOLFILE" else ossmix $PROC $VOLUME - echo "" > "$HOME/.volume_$PROC" + rm "$VOLFILE" fi -- cgit v1.2.3-24-g4f1b