screen-users
[Top][All Lists]
Advanced

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

Re: Session name in status line


From: Frank Blendinger
Subject: Re: Session name in status line
Date: Wed, 11 Mar 2009 16:37:24 +0100
User-agent: Mutt/1.5.18 (2008-05-17)

Hi.

On Wed 2009-03-11 12:29, Alexander Steinert <address@hidden>
proclaimed:
> Frank Blendinger, Wed 2009-03-11 01:53 CET:
> > I want to see the name of the session in my caption. As there is no
> > predefined string escape, I tried this:
> > 
> >     backtick 1 0 0 echo $STY
> >     caption always "...%1`..."
> > 
> > but the environment variable STY is not set when the backtick command is
> > executed.
> > 
> > How could I get the session name otherwise?
> 
> Since $STY is not set yet when screen sources .screenrc, you can use
> this trick in your .screenrc:
> 
> screen
> screen $SHELL -c 'screen -X caption always "$STY"'
> 
> I.e. send a screen command to the first window.

This is great, thanks!


Greetings,
Frank

-- 
Frank Blendinger | fb(at)intoxicatedmind.net | GPG: 0x0BF2FE7A
Fingerprint: BB64 F2B8 DFD8 BF90 0F2E 892B 72CF 7A41 0BF2 FE7A
  "Just because I don't care doesn't mean I don't understand."
                                               (Homer Simpson)

Attachment: signature.asc
Description: Digital signature


reply via email to

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