summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
Diffstat (limited to 'desktop')
-rwxr-xr-xdesktop/bin/aumute19
1 files changed, 7 insertions, 12 deletions
diff --git a/desktop/bin/aumute b/desktop/bin/aumute
index dd956d2..0bef6a3 100755
--- a/desktop/bin/aumute
+++ b/desktop/bin/aumute
@@ -31,29 +31,24 @@
# aumix-toggle-mute.sh --force-unmute
#
-TMP=$$
+MUTERC="$HOME/.aumixrc.mute"
function __mute() {
- if [ -e "$HOME/.aumixrc.mute" ]; then
+ if [ -e "$MUTERC" ]; then
aumix -v 0; aumix -w 0
else
- mv -f $HOME/.aumixrc $HOME/.aumixrc.$TMP
- aumix -S
+ aumix -f "$MUTERC" -S
aumix -v 0; aumix -w 0
- mv -f $HOME/.aumixrc $HOME/.aumixrc.mute
- mv -f $HOME/.aumixrc.$TMP $HOME/.aumixrc
fi
}
function __unmute () {
- if [ -e "$HOME/.aumixrc.mute" ]; then
- mv -f $HOME/.aumixrc $HOME/.aumixrc.$TMP
- mv -f $HOME/.aumixrc.mute $HOME/.aumixrc
- aumix -L > /dev/null
- mv -f $HOME/.aumixrc.$TMP $HOME/.aumixrc
+ if [ -e "$MUTERC" ]; then
+ aumix -f "$MUTERC" -L > /dev/null
+ rm -f "$MUTERC"
else
aumix -L > /dev/null
fi
@@ -68,7 +63,7 @@ elif [ "$1" = "--force-unmute" ]; then
__unmute;
-elif [ -e "$HOME/.aumixrc.mute" ]; then
+elif [ -e "$MUTERC" ]; then
__unmute;