Blog |Follow Nick on Twitter| About
 

1) Install GeekTool
2) Run this script....

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/bash

USERNAME="me@gmail.com"
PASSWORD="password"

EMAIL=`curl -u $USERNAME:$PASSWORD --silent "https://mail.google.com/mail/feed/atom" | tr -d '\n' | awk -F '<entry>' '{for (i=2; i<=NF; i++) {print $i}}' | sed -n "s/<title>\(.*\)<\/title.*name>\(.*\)<\/name>.*/\2 - \1/p"`

if [ -n "$EMAIL" ]
    then

    echo "INBOX:"
    echo "-----------------------------------------"

    IFS=$'\n'
    for i in $EMAIL
    do
        len=${#i}
        if [ "$len" -gt 40 ]
            then
            echo ${i:0:37} "..."
        else
            echo $i
        fi
    done
fi

3) smile

rgds,

Nick

 
Nick Bettison ©