13

Enhanced Mail.app Email List

Posted in Messaging by tresni 967 days ago

A highly (and easily) configurable email list. The script has a ton of options at the top of the file that you can configure to make the display look any way you want. I've attached a couple examples.

The available options are:

-- The number of emails to display
set numberOfEmails to 8
-- What to show when Mail.app isn't available
set notRunningMessage to "Mail.app is not running"
-- Should we only look at the primary account inbox?
set onlyPrimaryInbox to false

-- These options control the actual display, more details later
set unread_options to {include:true, ansi:"35", pre:" • ", post:""}
set read_options to {include:true, ansi:"8", pre:" • ", post:""}
set subj_options to {include:true, ansi:"1", pre:"", post:"", padding:{max:0, min:0, side:"left", char:" "}}
set from_options to {include:true, ansi:"0", pre:"", post:" - ", padding:{max:0, min:0, side:"both", char:" "}}
set body_options to {include:false, ansi:"0", pre:"", post:"", padding:{max:0, min:0, side:"right", char:" "}}

Options in the {include:false, ansi:"0", pre:"", post:"", padding:{max:0, min:0, side:"right", char:" "}} format allow you to control how things look.

  • include: allows you to ignore parts of the message. It can be true or false This is very helpful if you are using GPGMail as the message parsing when reading body contents can be very slow, turning body_options' include: to false prevents this (and is the default.)
  • ansi: sets the ANSI code to be for adding colors or effects to the particular text being processed. This uses the ANSI escape sequence for Select Graphics Rendition. See http://en.wikipedia.org/wiki/ANSIescapecode for more details. If you want no formatting use "0".
  • pre: is the text that should come before the text being processed
  • post: is the text that should come after the text being processed

The padding: object controls text padding & length

  • max: is the maximum number of characters to include
  • min: is the minimum number of characters, anything less will receive padding
  • side: can be "left", "right" or "both" to indicate where the padding to the string should be applied
  • char: is the character that will be used for padding

Note that while padding options can be included, they are not required (such as seen with the unread_options and read_options)

Currently, the line format is always: [READ/UNREAD][FROM][SUBJECT][BODY]


Geeklet files to download

Comments

User Avatar
BigBadBobD 794 days ago
all my mail is doubled. No idea how to get it fixed, each message shows up twice on the geeklet
User Avatar
BigBadBobD 794 days ago
I figured it out...settings in "Set onlyPrimaryInbox to false" I changed to "true" ;)

Log in to comment or register here.