diff options
author | Bobby Bingham <koorogi@koorogi.info> | 2016-12-23 18:40:22 -0600 |
---|---|---|
committer | Bobby Bingham <koorogi@koorogi.info> | 2016-12-23 18:40:22 -0600 |
commit | 1d257034ef7da805280cc70326738cc86e8512bb (patch) | |
tree | a2df4f760a4b80e6661e367ed38ca2b26704b019 /desktop | |
parent | ad327c5ce2a10a22c976001ac7af59a5104b7d2c (diff) |
desktop: simplify mute script
Diffstat (limited to 'desktop')
-rwxr-xr-x | desktop/bin/aumute | 19 |
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; |