所有 gnome 终端窗口的列表
我的 ubuntu 设置有各种 shell 脚本可以帮助我完成工作。其中,许多重要的因素是持久的。我有一个 shell,它负责“加载”这些各种持久 shell。
不过我希望它能够监视所有各种子外壳。并且能够在它本身关闭/任何子 shell 关闭后重新创建它。
使整个过程完全自动化。
目前,每个 shell 都有自己唯一的标题:因此,即使是所有打开的 gnome 终端标题的简单列表也可以工作...>.<问题是,完成这件事。
My ubuntu setup, has various shell-scripts that help me get my work done. Of which, many of the important ones, are persistent. I have a single shell, that does the "loading" of these various persistent shells.
However i would like it to be able to monitor all the various sub-shell. And to be able to recreate it, after it itself has closed / any sub-shell closes.
Making the whole thing fully automated.
Currently, each shell would have its own unique title : hence even a simple list of all opened gnome terminal titles would work... >.< problem is, getting that done.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
用途:
列出窗口管理器管理的所有窗口,或
列出所有 gnome 终端。
检查
man wmctrl
了解更多信息。Use:
to list all the windows managed by the window manager, or
to list all the gnome-terminals.
Check
man wmctrl
for more info.列出所有 gnome-terminal 窗口的窗口标题:
每个 gnome-terminal 窗口的窗口标题是当前选项卡的标题
选项
--onlyvisible
不隐藏最小化的窗口或其他桌面上的窗口。它抑制“内部”窗口,这些窗口实际上并不是 GUI 的一部分。您可以列出窗口的 PID - 请注意,多个或所有终端窗口可能属于 gnome-terminal 的同一进程:
要列出 X 窗口 ID,请在搜索后使用默认操作:
To list the window titles of all
gnome-terminal
windows:The window title of each
gnome-terminal
window is the title of the current tabThe option
--onlyvisible
is not hiding minimized windows, or windows on other desktops. It suppresses "internal" windows, which are not really part of the GUI.You can list the PIDs for the windows - note multiple or all terminal windows may belong to the same process of
gnome-terminal
:To list the X window IDs, use the default action after search: