Thank you very much for this great (and missing) extension to Thunderbird!
I use Gnome with the "
newmailnotify" script.
I've just adapted it to my needs.
#!/usr/bin/wish
# $Id: newmailnotify 724 2005-08-08 10:55:58Z adam $
# This is a Tcl/Tk version of a small newmail notify popup.
# Largely based on amsn's popup script. (http://amsn.sf.net)
#
# I use it in combination with the yamb thunderbird extension.
# (https://globs.org/index.php?lng=en)
# Script is tested on:
# - Solaris 8, running CDE.
# - Linux RH3E, running KDE.
#
# Arthur van Dam, http://www.math.uu.nl/people/dam
# uncomment this line to ring the system bell
#bell
# uncomment this line to play a sound (Solaris)
#exec audioplay /usr/demo/SOUND/sounds/laughter.au
#-------------------------------------------------------
# Cuts off a string at n characters and adds three dots '...'
proc chopString { str n } {
if {[string length $str] >$n} {
set str "[string range $str 0 [expr $n-1]]..."
}
return $str;
}
#-------------------------------------------------------
# yamb specific stuff:
set subjectData [lindex $argv 0]
set senderData [lindex $argv 1]
set recipientsData [lindex $argv 2]
set sizeData [lindex $argv 3]
set folderData [lindex $argv 4]
set accountTypeData [lindex $argv 5]
set accountNameData [lindex $argv 6]
# I still need to get rid of the main window, just make it small for now.
wm geometry . 10x10
wm overrideredirect . 1
set width 250
set height 62
#set family "Helvetica"
set family "-adobe-helvetica-medium-r-normal-*-*-80-*-*-p-*-iso10646-1"
# A nice post-it note yellowish:
set bgcolor "#FFFFCC"
set size "10"
set xpos 1
set ypos 1
set linelength 30
font create sboldf -family $family -size $size -weight bold
font create splainf -family $family -size $size -weight normal
font create sbolditalf -family $family -size $size -weight bold -slant italic
set w .newmail
toplevel $w -width 1 -height 1
wm group $w .
wm state $w withdrawn
canvas $w.c -bg $bgcolor -width $width -height [expr $height] \
-relief solid -borderwidth 1
pack $w.c -fill y
set msg "[chopString "From: $senderData" $linelength]\n[chopString "Subject: $subjectData" $linelength]\n[chopString "Size: $sizeData bytes" $linelength]"
#\nand\nmuch\nmore\ntext"
&nbs p; set notify_id [$w.c create text 5 5 -font sboldf \
-justify left -width [expr $width-10] -anchor nw -text "New Mail!"]
set notify_id [$w.c create text 5 20 -font splainf \
-justify left -width [expr $width-10] -anchor nw -text "$msg"]
wm title $w "New mail"
wm overrideredirect $w 1
#wm transient $w
wm state $w normal