[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; ; ) |
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.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- get information about screen windows,
Hauke Laging <=