Re: [wmii] Mail notification

From: Adam Gray <adam_AT_bandstand.org.uk>
Date: Wed, 20 Jun 2007 18:26:51 +0100

On 20/06/07, Aaron Grattafiori <Cogitate_AT_sonic.net> wrote:
> I had a simple script awhile ago that used just bash and fetchmail -c.
That would be useful... I've never really been proactive enough to
download the plan9 stuff, as wonderful as it may be. ^_^

> Making the box go red is harder because the bottom "status" bar already
> has WMII_NORMCOLORS. Mine just blinked "NEW MAIL".
Surely it would just be possible to do `wmiir create /bar/xmail`
(say), then `wmiir write /bar/xmail/colors` to change the colour to
red? I just did that and it works well.

> In your wmiirc, you'll find the funtion status():
>
> status() {
> echo -n $(uptime | sed 's/.*://; s/,//g') '|' $(date)
> }
> You can edit that line how you see fit, my laptop has free mem. and batt
> left in %, non 24hr time, and a few other things.... Keep in mind that it
> runs every second, so you'll want to keep whatever your doing pretty
> lightweight. fetchmail -c running every second is a little extreme heh.
That shouldn't be too much of a problem, since I only want to use this
to check my local mail. I just need an equivalent of fetchmail -c for
local mail. Mailx would work to a certain extent - it gives an exit
code of 0 if there's no mail and 1 if there is, but it's messy and
starts an interactive thing if there is mail, and doesn't have a
non-interactive mode. So I'm trying to find some kind of solution that
will work similarly.

A

-- 
Adam Gray
"Life + self-doubt = peace"
        -- Jan Buttinger
Received on Wed Jun 20 2007 - 19:26:52 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 16:25:13 UTC