Make screen title flash ...

View: New views
6 Messages — Rating Filter:   Alert me  

Make screen title flash ...

by Alan Young :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Is there a way to make a screen title flash?

If I'm using the wrong word here, I appologize.  On my status line I have

Screen(s): 0* irssi 1 stuff 2 morestuff 3 logs 4 htop 5 remote-server ...

I want to make the "0* irssi" flash on command.

My reason for this is I have bitlbee and twirssi setup and I'd like to
be notified when someone says my name in channel or sends me a direct
message via twitter or sends me an im.

I can intercept those ok, but I can't figure out how to make screen notify me.

Any ideas?
--
Alan


_______________________________________________
screen-users mailing list
screen-users@...
http://lists.gnu.org/mailman/listinfo/screen-users

Re: Make screen title flash ...

by Christian Ebert :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

* Alan Young on Wednesday, August 12, 2009 at 16:34:48 -0600

> Is there a way to make a screen title flash?
>
> If I'm using the wrong word here, I appologize.  On my status line I have
>
> Screen(s): 0* irssi 1 stuff 2 morestuff 3 logs 4 htop 5 remote-server ...
>
> I want to make the "0* irssi" flash on command.
>
> My reason for this is I have bitlbee and twirssi setup and I'd like to
> be notified when someone says my name in channel or sends me a direct
> message via twitter or sends me an im.
>
> I can intercept those ok, but I can't figure out how to make screen notify me.
>
> Any ideas?

Monitor the the window in question?

I have the following in my screenrc:

bind I screen -M 7 irssi

c
--
\black\trash movie    _C O W B O Y_  _C A N O E_  _C O M A_
                     Ein deutscher Western/A German Western

         --->> http://www.blacktrash.org/underdogma/ccc.php


_______________________________________________
screen-users mailing list
screen-users@...
http://lists.gnu.org/mailman/listinfo/screen-users

Re: Make screen title flash ...

by Alan Young :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Wed, Aug 12, 2009 at 17:43, Christian Ebert<blacktrash@...> wrote:
> Monitor the the window in question?

That won't work ... if I leave my irssi window in an active chat then
I'll get a ton of false positives.  Also, other windows won't get
noticed that way either.
--
Alan


_______________________________________________
screen-users mailing list
screen-users@...
http://lists.gnu.org/mailman/listinfo/screen-users

Re: Make screen title flash ...

by Malte Skoruppa :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

maybe you could do something with a little bash script?
Remember that you can change the screen title from within the console by echoing a special control sequence, e.g. echo -n -e "\033kmy screen title\033\\"

Let us assume you have the title you want to make blink in a variable $TITLE

Then how about this:

# first we need a function that generates an
# empty string of the same length as $TITLE
makeblanks() {
 len=${#TITLE}
 BLANKTITLE=''
 for i in `seq $len`; do
  BLANKTITLE+=' '
 done
}

# now we have the title in $TITLE and the
# "blank" title in $BLANKTITLE
# all we need to do is alternate them every
# second or so
blink() {
 makeblanks
 status=0
 while [ true ]; do
  sleep 1
  if [ $status -eq 0 ]; then
   echo -n -e "\033k$BLANKTITLE\033\\"
   status=1
  else
   echo -n -e "\033k$TITLE\033\\"
   status=0
  fi
 done
}


Now all you need to do when you want to make your screen title flash is call the function blink
This can certainly be improved; e.g. maybe you don't want to have an infinite loop there, or it will never stop blinking... but I just wanted to give the key idea. :-)

Cheers,

Malte


Alan Young wrote:
On Wed, Aug 12, 2009 at 17:43, Christian Ebertblacktrash@... wrote:
  
Monitor the the window in question?
    

That won't work ... if I leave my irssi window in an active chat then
I'll get a ton of false positives.  Also, other windows won't get
noticed that way either.
  


_______________________________________________
screen-users mailing list
screen-users@...
http://lists.gnu.org/mailman/listinfo/screen-users

Re: Make screen title flash ...

by Sadrul Habib Chowdhury :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On Wed, Aug 12, 2009 at 6:34 PM, Alan Young <alansyoungiii@...> wrote:
Is there a way to make a screen title flash?

If I'm using the wrong word here, I appologize.  On my status line I have

Screen(s): 0* irssi 1 stuff 2 morestuff 3 logs 4 htop 5 remote-server ...

I want to make the "0* irssi" flash on command.

My reason for this is I have bitlbee and twirssi setup and I'd like to
be notified when someone says my name in channel or sends me a direct
message via twitter or sends me an im.

 
There's a new command 'rendition' added to the development version (the man page is also updated!). If you can get your application to beep when you want to be notified (e.g. bitlbee beeps when some says your name etc.), then you can do the following:

  rendition bell +B

This will cause the title of the window to flash in the caption/hardstatus, until it is selected. You can also give different background/foreground colors to the title if you want, or make it bold, underline etc. (the 'STRING ESCAPES' section in the man page explains the syntax for all of them)

Cheers,
Sadrul


_______________________________________________
screen-users mailing list
screen-users@...
http://lists.gnu.org/mailman/listinfo/screen-users

Re: Make screen title flash ...

by Alan Young :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Wed, Aug 26, 2009 at 03:52, Sadrul H Chowdhury<imadil@...> wrote:
> There's a new command 'rendition' added to the development version (the man
> page is also updated!). If you can get your application to beep when you

Oh, nice.  Thanks.
--
Alan


_______________________________________________
screen-users mailing list
screen-users@...
http://lists.gnu.org/mailman/listinfo/screen-users