get information about screen windows

Hauke Laging <[email protected]>
Newsgroups gmane.comp.gnu.screen.user
Message-ID <77486217.Z6QPOY7UHL@inno>
Hello,

I run two scripts simultaneously within screen. screen is started by a 
script. I am working on a method for automatic window selection 
depending on the state of the scripts. This works (screen -S mysession 
select win1) but for certain improvements I need information (i.e. a 
script needs it thus interactive features are of little use) about the 
windows (and the processes within):

 1)   How can I determine the tty (/dev/pts/xy) that belongs to a 
certain window?

 2)  How can I determine which is the foreground / active window?

Answering (1) would be possible by running tty after starting the new 
window and write its output somewhere. But a screen-internal solution 
would be more elegant and easier to implement (I guess).

Interactively the commands windowlist and windows give the answer to (2) 
but I haven't managed to get this output as input into a script. 
Furthermore: Coding this information as highlighting is nice for the 
user but not so nice for a script.


Hauke
-- 
Crypto für alle: http://www.openpgp-schulungen.de/fuer/unterstuetzer/
http://userbase.kde.org/Concepts/OpenPGP_Help_Spread
OpenPGP: 7D82 FB9F D25A 2CE4 5241 6C37 BF4B 8EEF 1A57 1DF5

_______________________________________________
screen-users mailing list
screen-users-mXXj517/[email protected]
https://lists.gnu.org/mailman/listinfo/screen-users
signature.asc (application/pgp-signature, 490 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)

iQEcBAABCAAGBQJTIQrYAAoJEEhrF6s/lq2OrsMIAIaWpMpLpEsLhBasjKcbE26x
gXNpEf30Q5cCPahdK0zC6Rq1DFwF0NNXVjBz+ObtymIjZcGrve2vB+HgST1aEg+U
SB3gBDk3k7NXE9bCCjsL1eusp5noPq/iZiYon42wIfhK1p/gHl34xdSDeCZMrXhp
NQ8IdlSBJHSgQmFCHuyLHNkgHQkHDezVNJcBPUR3Vqnyk32MDollt7JCstnbjCG1
N/owRV0nfofPvfvwg1uXCGB0LFvncCMfDKlsvtZQKmDd7eCqCGDpo/Vik6FYy+dg
nd/OBADZTE8vlJpYDpTsUtDx3bniotBqUUBapZBbcRJNUGubgB2OZVMQUdmzcL4=
=A46U
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.