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: Maurice van der Pot
Subject: Re: [monitoring-like] would like to be warned when I have mail (fetchmail -c)
Date: Tue, 27 Sep 2005 18:48:55 +0200

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). But I couldn't
> see in 'man screen' anything like that tough a reference to
> > o  A weird imagination is most useful to gain full advantage of all the
> >    features.
> which let me think someone may be able to help me...

Here's something you can try:

- write a script to periodically run fetchmail -c and beep if you have
  new mail
- set bell_msg to "Bell in window %n: %t" in your .screenrc. %t will be
  replaced by the screen window title
- add the following line to your .screenrc:
    shelltitle '> |bash'
  Replace "> " in the above line with some pattern that matches the end
  of your prompt. Screen will use this to find the name of the currently
  running command whenever it encounters a certain escape code (see next
  item). "bash" here is the default name.
- export PROMPT_COMMAND='echo -ne "\033k\033\\"' in .bashrc (or adapt to
  your shell). This will output the escape code that triggers screen to 
  get the current command name and put it in its window title

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.

Hope this helps.

Maurice.

-- 
Maurice van der Pot

Gentoo Linux Developer   address@hidden     http://www.gentoo.org
Creator of BiteMe!       address@hidden   http://www.kfk4ever.com

Attachment: pgp4IKWe0HBMB.pgp
Description: PGP signature


reply via email to

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