首页 > 解决方案 > 即使隐藏了,如何强制 Awesome 显示实际的 xterm 标题?

问题描述

当我显然隐藏一个 xterm 时,Awesome WM 将标题转换为简单的“xterm”,而不是显示实际窗口的名称。

例如,如果我有这个(用 查询xwininfo):

 xwininfo: Window id: 0x5c0000d "xterm:john:$   top"
 Map State: IsViewable
 ...

但是,如果我点击任务栏来“隐藏”这个 xterm,会xwininfo这样说:

 xwininfo: Window id: 0x5c0000d "xterm:john:$   top"
 Map State: isUnmapped
 ...

因此,xwininfo 将不再可见的 xterm 视为“isUnmapped”(与 isViewable 相对)。但它的标题没有改变:它仍然是"xterm:john:$ top".

到目前为止,一切都很好。除了 Awesome 现在在任务栏中只显示“xterm”而不是实际的 xterm 标题。

所以当 xterm 可见时我有我想要的行为,但是当 xterm 隐藏时我没有我想要的行为。

在这两种情况下,如何让 Awesome 显示实际的 xterm 标题而不是简单的“xterm”?

如果我能得到 Awesome to show 的奖励点"[HIDDEN]: xterm:john:$ top",所以我会立即知道 xterm 当前是否可见。

PS:我有一个非常自定义的 xterm 标题,在每个命令处更新,指示命令当前是否正在运行等,据我所知,我的自定义始终正确设置 xterm 的窗口标题(如 xwininfo 所示)。

标签: taskbarxtermawesome-wm

解决方案


It's probably displaying the icon title. You can see that information using xprop, e.g., as the WM_ICON_NAME and _NET_WM_ICON_NAME properties. xwininfo shows only information for the selected window (an icon is actually a different window).

The escape sequence used to set the title string has a 2 parameter, to denote just the window title. Changing that to 0 tells xterm to set both icon and window titles.


推荐阅读