Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

UNIX mail notification in the dock UNIX
All i wanted was a simple biff program for the dock, just a little, unobstrusive, audio/visual "new mail" signal, so that i wouldn't keep popping open my mutt window every N minutes (bad discipline). No such luck and too lazy to write something myself (and afraid of SOMEHOW managing to screw something up and lose mail). Here's what i ended up doing.

Read the rest of the article for the how-to. This hint assumes you have mutt and esound installed ... check out fink first if you don't...

[Editor's note: This tip also assumes the Dev Tools are installed and you have some knowledge of compiling UNIX software. I have not tried it myself, since I'm pretty happy with Mail.app]

Instructions:
  1. Configured mutt so that it had a very visible color for new messages in the index, bright yellow or something... this way you can see it in the Dock:
    color index brightred default "~N"
  2. Downloaded and compiled netbiff (maybe this should be a fink package)

  3. Configured netbiff to play a sound in my home directory (it's actually just a copy of Submarine.aiff from System -> Library -> Sounds). If i change my mind, i'll just copy over it without bothering to change my config:
    action "mybeep" "esdplay ${HOME}/Library/Sounds/BiffSound.aiff >& /dev/null"

    connection
    name "my mail"
    command "/homemade/bin/netbiffd"
    update "mybeep"
    folder "/mail/me"
    endconnection
  4. Made a mutt script to 1) run mutt with colours 2) launch netbiff (if not already running). The reason i chose to run it with mutt is because i couldn't figure out how to get something to run only whenever i logged into my mac (ended up creating a .command file and putting it in my login System Preferences thingy, but that gave me a Terminal window to shut, which annoyed me). I always have mutt running anyway):
    #!/bin/tcsh

    # detect if netbiff has already been launched
    set HASBIFF=`ps`
    set HASBIFF2=`echo ${HASBIFF} | grep netbiff`

    # launch netbiff if neccesary
    if ( "${HASBIFF2}" == "") then
    echo "starting netbiff"
    netbiff 2> /dev/null &
    else
    echo "biff already there"
    endif

    # set the title bar to say "mutt"
    #settitle ${HOST} mutt

    # launch mutt, passing arguments
    setenv TERM xterm-color
    mutt $*

    # set the title bar back to normal
    #cwdcmd
    Threw in a bits from a title bar hint for free ... oooh.

  5. aliased mutt to my callMutt script

  6. went away and hoped i would never be wasting my time on such trivialities again instead of doing real work
Okay, i'm embarassed to admit that this took me friggin forever to figure out... hopefully someone finds it useful, or maybe posts a tidier solution.
    •    
  • Currently 1.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (1 vote cast)
 
[7,101 views]  

UNIX mail notification in the dock | 1 comments | Create New Account
Click here to return to the 'UNIX mail notification in the dock' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
mileage might vary / small fixes
Authored by: the_shrubber on Feb 22, '02 12:01:52PM
sorry... i kept getting confused about my shell
  1. the callMutt script should have this for netbiff instead of the other redirection thingy: netbiff > /dev/null &
  2. it's probably a good idea to get rid of the redirection stuff in your netbiffrc
  3. if you're reading your mail over an NFS mount you should use the 0.9.10 version of netbiff, and set stick this in the callMutt script setenv NETBIFFD_IGNORE_ATIME 1 i'm still not 100% sure this works yet... it seems like netbiff is still not noticing all the new mail... anyone know why?
  4. you should probably seperate the mutt colour idea and the netbiff idea... maybe have the netbiff called by an Applescript from your login
Basically, this needs work

[ Reply to This | # ]