|
From: | Malte Skoruppa |
Subject: | Re: Make screen title flash ... |
Date: | Thu, 13 Aug 2009 14:47:55 +0200 |
User-agent: | Thunderbird 2.0.0.22 (X11/20090719) |
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 Ebert<address@hidden> 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. |
[Prev in Thread] | Current Thread | [Next in Thread] |