I have the following .xsession file


xsetroot -cursor_name left_ptr

while xsetroot -name "`date`"
      sleep 1
done &

feh --bg-scale wallpaper.jpg &

What program can I use to add an email checker near the date command?

2 Answers 2


Follow these instructions: (you will need fetchmail)


  • Thanks, but I prefer something like mutt instead of fetchmail. Do you know something about this solution?
    – proofit404
    Dec 7, 2012 at 18:26

I use mutt with offlineimap so this might not apply to you but for the offlineimap case you just have to check the files in $MAILDIR/account/INBOX/new, e.g.

numofnewmail="$(find $maildirs -type f | wc -l)"
xsetroot -name "mail: $numofnewmail, $date"

where $MAILDIR is usually ~/.mail. Also, depend on your mail account and your configuration also the name of the inbox folder can vary (e.g. Inbox instead of INBOX).

Also, you didn't ask for it, but here's a wizard that can help you setup mutt with offlineimap.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.