[Top][All Lists]

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

get information about screen windows

From: Hauke Laging
Subject: get information about screen windows
Date: Thu, 13 Mar 2014 02:33:12 +0100
User-agent: KMail/4.11.5 (Linux/3.11.10-7-desktop; KDE/4.11.5; x86_64; ; )


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.

Crypto für alle:
OpenPGP: 7D82 FB9F D25A 2CE4 5241 6C37 BF4B 8EEF 1A57 1DF5

Attachment: signature.asc
Description: This is a digitally signed message part.

reply via email to

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