[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Script knowing if in screen / screen window correponding to tty
From: |
Jason White |
Subject: |
Re: Script knowing if in screen / screen window correponding to tty |
Date: |
Fri, 9 Jul 2004 11:55:02 -0500 |
User-agent: |
Mutt/1.4.2.1i |
On Fri, Jul 09, 2004 at 12:16PM -0400, Buddy Burden wrote:
[...]
>1) Is there a way for a script to tell whether it's running inside
>screen?
Check for the presence of the STY or WINDOW environment variable.
>2) Is there any way to know what screen window corresponds to a given
>tty?
Probably, but the answer isn't immediately obvious to me.
>I generally have so many screen windows open that it's easy for me
>to lose track of what's where.
You might want to look at the 'shelltitle' screen option. When
properly set, it will change your window title to the name of the
command currently invoked in that window. For example: on my system
when I do C-A w I see:
0 tcsh 1* mutt 2 irc 3- tcsh 4 nano 5 ssh 30 zwgc
If you have more windows that will fit on the width of your screen, you
might want to use the interactive version that will allow you to select
which window to switch to by binding a key to the 'window' command.
You can try it out by typing 'C-a : window', then return.
-Jason
--
Jason White (address@hidden) http://www.jdwhite.org/~jdwhite
Jabber:jdwhite(jabber.org) IRC:irc.netbsd.org/{jdwhite,jdw}
PGP KeyID: 0x5290E477/A8A2 3FDB AB33 98EB ED74 EDAA F538 9A30 5290 E477
- Script knowing if in screen / screen window correponding to tty, Buddy Burden, 2004/07/09
- Re: Script knowing if in screen / screen window correponding to tty,
Jason White <=
- Re: Script knowing if in screen / screen window correponding to tty, Buddy Burden, 2004/07/09
- Re: Script knowing if in screen / screen window correponding to tty, Jason White, 2004/07/11
- Re: Script knowing if in screen / screen window correponding to tty, Jason White, 2004/07/11
- Re: Script knowing if in screen / screen window correponding to tty, Buddy Burden, 2004/07/12
- Re: Script knowing if in screen / screen window correponding to tty, Jason White, 2004/07/12
- Re: Script knowing if in screen / screen window correponding to tty, Buddy Burden, 2004/07/13
Re: Script knowing if in screen / screen window correponding to tty, Shawn McMahon, 2004/07/09