[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: |
Sun, 11 Jul 2004 22:17:50 -0500 |
User-agent: |
Mutt/1.4.2.1i |
On Sun, Jul 11, 2004 at 08:07PM -0500, Jason White wrote:
> I think a nice way of implementing this feature would be to create a
> string escape for the pty of the current window and then use a custom
> 'windowlist string' argument.
...and so I did. This is a quick mod to add a string escape (%T)
which will be expanded to the full path of the tty a given window is
using. This patch is against screen-4.0.2 and was only barely tested
under NetBSD 2.0_BETA.
I added the following to my .screenrc:
windowlist string "%3n %t <%T>%=%f"
When I invoke the windowlist command it looks like:
Num Name Flags
0 less </dev/ttypi> $
1 tcsh </dev/ttypj> $
2 vi </dev/ttypg> $
Enjoy,
-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
screen-4.0.2-ttyname.patch
Description: Text document
Re: Script knowing if in screen / screen window correponding to tty, Shawn McMahon, 2004/07/09
Re: Script knowing if in screen / screen window correponding to tty, Sami Samhuri, 2004/07/09