diff options
author | Florian Pritz <f-p@gmx.at> | 2009-04-14 19:21:26 +0200 |
---|---|---|
committer | Florian Pritz <f-p@gmx.at> | 2009-04-14 19:21:26 +0200 |
commit | bbfb8eb1eca07705a8b5fc71c25de3cbbbcd0e38 (patch) | |
tree | 1d4fe4048e1c847ac2f16ed7d1b32ba5f30ac806 /oss-mute-proc.sh | |
parent | 53ea962bb51e28fd35d0ecc0d8e036d8df200a44 (diff) | |
download | bin-bbfb8eb1eca07705a8b5fc71c25de3cbbbcd0e38.tar.gz bin-bbfb8eb1eca07705a8b5fc71c25de3cbbbcd0e38.tar.xz |
moved oss-mute-proc voolume file to /tmp
Diffstat (limited to 'oss-mute-proc.sh')
-rwxr-xr-x | oss-mute-proc.sh | 9 |
1 files changed, 5 insertions, 4 deletions
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 <f-p@gmx.at> # # 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 |