Re: [dwm] dwm-4.4 is on its way

From: Antoni Grzymała <antoni_AT_chopin.edu.pl>
Date: Mon, 30 Jul 2007 10:52:19 +0200

On Mon, 30 Jul 2007 06:50:55 +0200, Jeremy O'Brien <obrien654j_AT_gmail.com>
wrote:

> Hello there. A little off-topic from this thread, but I noticed in that
> screenshot that you have a "messages:6" line in your status bar. How in
> the heck did you get that to show there? I can't find any programs
> outside of gkrellm's mail monitor that supports maildir-style mailboxes.
> Thank you so much...

Here's some bash code I use in my dwm status-bar script to show the number
of unread messages in my maildirs, just noticed it's got some hardcoded
regexp strings you need to change along with the ${DIRS} variable (in
other words, needs some cleaning up):

############################################################
# Maildir UNREAD messages

DIRS="/var/spool/mail/antoni/new/ /home/antoni/mail/*/new/"

for dir in ${DIRS}; do
         licznik=0
         for k in ${dir}/*; do
                 [[ -f ${k} ]] && ((licznik++))
         done

         if [[ ${licznik} -ne 0 ]]; then
                 dir=${dir/\/var\/spool\/mail\/antoni\/new\//Spool}
                 dir=${dir/\/home\/antoni\/mail\//}
                 dir=${dir/\/new\//}
                 MAIL="${dir}: ${licznik} · ${MAIL}"
         fi
done

############################################################

All of my scripts are available at theka.tk/dwm if you're interested (may
not be current).

Best,

[a]

-- 
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
Received on Mon Jul 30 2007 - 10:55:10 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 14:47:21 UTC