On Mon, Jul 30, 2007 at 10:52:19AM +0200, Antoni Grzymała wrote:
> On Mon, 30 Jul 2007 06:50:55 +0200, Jeremy O'Brien <[EMAIL PROTECTED]>  
> 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]
> 
> 
Thank you. That worked like a charm.

-- 
__neutral__insomniac__

Attachment: pgpqnoMuz7YoB.pgp
Description: PGP signature

Reply via email to