#!/bin/bash # retrieve the folder that triggered the execution folder=$1 # set the sound-file according to the folders's name if [ $folder = "MozExt" ]; then sound="chewbacca_roar.wav" elif [ $folder = "Sean" ]; then sound="bart_ayecaramba.wav" elif [ $folder = "Colleagues" ]; then sound="cartman_respectauthority.wav" else sound="eudora-sound.wav" fi # play the sound using "alsa-play" aplay /home/achim/Mozilla/thunderbird/misc/${sound} & # display a notification window for 5 seconds (sleep 1s; echo 20; sleep 1s; echo 40; sleep 1s; echo 60; sleep 1s; echo 80; sleep 1s; echo 100;) | zenity --title "Thunderbird Notification" --window-icon /home/achim/Mozilla/thunderbird/misc/mail.png --progress --text "\"${folder}\" has new mail!" --percentage=0 --auto-close &