Gus*_*Gus 11 xterm gnome-terminal
在 xterm(或 gnome-terminal)中运行以下命令设置所谓的“图标名称”:
echo -en "\e]1;some_value\a"
Run Code Online (Sandbox Code Playgroud)
这有什么作用?
请注意,可以使用相同的命令将“窗口标题”和“图标名称”设置为相同的值,因此我不明白“图标名称”如何成为图像的路径。
der*_*ert 17
很久以前,有一个窗口管理器叫 twm——实际上,它仍然存在并且运行得很好。它没有像 MS Windows、Mac OS X 和许多现代窗口管理器那样将窗口最小化为屏幕底部的栏(或类似的),而是将它们缩小为带标签的图标(“iconfify”)。
在维基百科的文章TWM有一些好看的图片,如:
窗口标题是标题栏中的内容(例如,“计算器”或“xterm”)。图标名称是图标化时图标下的内容(“xclock”)。现代窗口管理器可能都忽略图标名称,因为它们不使用图标 UI。
我将在xterm
这里讨论:这是一个旧软件,它的许多术语现在已经过时了。在man xterm
这样说的:
Run Code Online (Sandbox Code Playgroud)iconName (class IconName) Specifies a label for xterm when iconified. Xterm provides no default value; some window managers may assume the application name, e.g., "xterm" Setting the iconName resource sets the icon label unless overridden by zIconBeep or the control sequences which change the window and icon labels.
这意味着它iconName
不能是图标图像,它只是在xterm
图标化时赋予窗口的标签。也可以使用-n
选项设置:
Run Code Online (Sandbox Code Playgroud)-n string This option specifies the icon name for xterm's windows. It is shorthand for specifying the "iconName" resource. Note that this is not the same as the toolkit option -name (see below). The default icon name is the application name.
xterm
像这样开始后,使用title
!=iconName
我仍然看不到ICON
图标化xterm
窗口后显示的字符串(Alt-F9 in fluxbox
):
$ xterm -n ICON -T a-new-title
Run Code Online (Sandbox Code Playgroud)
通过xterm
联机帮助页进一步挖掘发现(**
我的):
Run Code Online (Sandbox Code Playgroud)activeIcon (class ActiveIcon) Specifies whether or not active icon windows are to be used when the xterm window is iconified, if this feature is compiled into xterm. The active icon is a miniature representation of the content of the window and will update as the content changes. Not all window managers necessarily support application icon windows. Some window managers will allow you to enter keystrokes into the active icon window. The default is "default". Xterm accepts either a keyword (ignoring case) or the number shown in parentheses: false (0) No active icon is shown. true (1) The active icon is shown. If you are using twm, use this setting to enable active-icons. default (2) Xterm checks at startup, and shows an active icon only for window managers which it can identify and which are known to support the feature. **These are fvwm (full support), and window maker (limited).** A few other windows managers (such as twm and ctwm) support active icons, but do not support the exten- sions which allow xterm to identify the window manager.
activeIcon
可能与iconName
功能没有直接关系,但是它为我们提供了一个线索,即与图标相关的功能xterm
只有在某些窗口管理器中才能正常工作。我建议Xephyr
测试一个fvwm
或window maker
按照联机帮助页中的说明进行测试:
$ Xephyr :1 -ac -screen 800x600
Run Code Online (Sandbox Code Playgroud)
在另一个终端中:
$ DISPLAY=:1 wmaker
Run Code Online (Sandbox Code Playgroud)
现在让我们从xterm
内部开始window maker
:右键单击 -> Applications
-> Terminals
-> xterm
。开始xterm
有-n
选择再次:
$ xterm -n ICON -T a-new-title
Run Code Online (Sandbox Code Playgroud)
右键单击标题栏并选择Miniaturize
。现在您可以看到一个xterm
图标实际上被标记为ICON
。单击它返回它并看到标题栏是a-new-title
。结论是该iconName
功能仅适用于某些窗口管理器,很可能是较旧的。如果您觉得强大,您可以浏览window maker
源代码并在不支持iconName
.
顺便说一句,要更改xterm
图标图像,请参阅:https : //superuser.com/questions/344320/how-do-i-change-the-icon-of-an-xterm。