Created
June 8, 2012 07:52
-
-
Save eidantoei/2894303 to your computer and use it in GitHub Desktop.
Quick mute Thunderbird notification sound (bash script)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
SND_ON="/Users/me/Music/win95.wav" | |
SND_OFF="/Users/me/Music/silent.wav" | |
SND_ALIAS="/Users/me/Music/thunderbird_notify.wav" | |
HASH_ON=$(md5 -q ${SND_ON}) | |
HASH_OFF=$(md5 -q ${SND_OFF}) | |
HASH_ALIAS=$(md5 -q ${SND_ALIAS}) | |
CL_BLUE="\033[34m" | |
CL_PINK="\033[35m" | |
CL_RESET="\033[0m" | |
if [ "${HASH_ALIAS}" = "${HASH_OFF}" ];then | |
cp -p ${SND_ON} ${SND_ALIAS} && \ | |
echo -e "OFF --> ${CL_BLUE}ON${CL_RESET}" | |
elif [ "${HASH_ALIAS}" = "${HASH_ON}" ];then | |
cp -p ${SND_OFF} ${SND_ALIAS} && \ | |
echo -e "ON --> ${CL_PINK}OFF${CL_RESET}" | |
else | |
cp -p ${SND_ON} ${SND_ALIAS} && \ | |
echo -e "??? --> ${CL_BLUE}ON${CL_RESET}" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment