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
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ screen-users mailing list screen-users@gnu.org https://lists.gnu.org/mailman/listinfo/screen-users