screen-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [monitoring-like] would like to be warned when I have mail (fetchmai


From: Will Maier
Subject: Re: [monitoring-like] would like to be warned when I have mail (fetchmail -c)
Date: Tue, 27 Sep 2005 13:03:45 -0500
User-agent: Mutt/1.5.6+20040907i

On Tue, Sep 27, 2005 at 06:48:55PM +0200, Maurice van der Pot wrote:
> On Tue, Sep 27, 2005 at 05:06:49PM +0200, Thomas Baruchel wrote:
> > tell screen when I have new mail in order to
> > be warned (message in the status line would be great). 
[snip]

> Here's something you can try:
[snip]
> Unfortunately this only works for non-active windows. I've
> submitted a bug report requesting something like a bell_msg_always
> setting, but I haven't had any response yet.

This seems to be a good opportunity to make use of the hardstatus
and backticks. I agree a script is the right idea; here's how I'd do
it.

    $ cat ~/bin/screen-checkmail
    #!/bin/sh
    fetchmail -c $OTHER_FETCHMAIL_JIGGERY_POKERY
    [parse fetchmail output reasonably]
    
    $ cat ~/.screenrc
    ...
    backtick 1 60 1 /$HOME/bin/screen-checkmail
    ...
    hardstatus alwayslastline ...%1`...

Adding a conditional wrapper around your mail checker (eg %?...%?)
will ensure that you only see your mail alert when your checkmail
script produces output.

-- 

[Will address@hidden/address@hidden





reply via email to

[Prev in Thread] Current Thread [Next in Thread]