[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [STUMP] Email info
From: |
David Flatz |
Subject: |
Re: [STUMP] Email info |
Date: |
Fri, 12 Nov 2010 14:03:42 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Hi Paulo.
Paulo J. Matos wrote:
> I read my email using Gnus and it would be awesome if stumpwm could
> provide some information on new mail upon arrival. Now that I am
> thinking about it, it doesn't even need to be connected to
> Gnus. Something that simply checks the server would be enough. Are there
> any scripts like this around? Otherwise I will just go ahead and try to
> hack one.
Here's how I do that. I get my mails with fetchmail by the way.
I have following at the beginning of my .procmailrc:
--->8---
:0ch
|/home/david/bin/mail-notification
--->8---
and my mail-notification:
--->8---
#!/bin/sh
# vim:et
if test -z "$DISPLAY"; then
export DISPLAY=":0.0"
fi
while read mailline; do
if [ "x${mailline:0:6}" == "xFrom: " ]; then
from=${mailline:6}
continue
fi
if [ "x${mailline:0:9}" == "xSubject: " ]; then
subject=${mailline:9}
continue
fi
done
stumpish echo "^2*^BNew Mail!^b^n (^B${from}^b): ${subject}"
--->8---
I would be interested if you (or anybody else) would come up with a more
elegant solution.
Regards,
David