Thunderbird Extensions
Apple - mac
Web iPhoto Access
Make a donation to help WiPhA development



 Count of members 29 members

Users online

( nobody )

 147708 visitors

 10 visitors online

forum.gifForum - Yamb - Topic #23

Topic #23 Great extension -- Thanks!
    by ghostintheshell - visitor
14/11/2005 @ 04:20
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.


# $­Id: newmailnotify 724 2005-08-08 10:55:58Z adam $­
# This is a Tcl/Tk version of a small newmail notify popup.
# Largely based o­n amsn's popup script. (
# I use it in combination with the yamb thunderbird extension.
# (
# Script is tested o­n:
#  - Solaris 8, running CDE.
#  - Linux RH3E, running KDE.
# Arthur van Dam,

# uncomment this line to ring the system bell

# uncomment this line to play a sound (Solaris)
#exec audioplay /usr/demo/SOUND/sounds/

# 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]"

             &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

Post an answer

^ Top ^

GuppY -    Site powered by GuppY v4.5.14 2004-2005 - CeCILL Free License   GuppY -

Document generated in 0.11 second