0

I have the following .xsession file

#!/bin/sh

xsetroot -cursor_name left_ptr

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

feh --bg-scale wallpaper.jpg &
/home/aamalyshev/bin/dwm

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

2 Answers 2

1

Follow these instructions: (you will need fetchmail)

http://dwm.suckless.org/scripts/email_notifier_script

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

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.

maildirs="$HOME/.mail/*/INBOX/new/"
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.