hai*_*sis 5 shell colors terminal gnome-terminal tabs
我想在我的终端模拟器(即 gnome-terminal)中设置选项卡的颜色,就像在 osx 的终端模拟器中一样。众多的 Linux 终端仿真器中是否有此功能?
编辑:下面的图片可以更好地解释所需的结果。

我不知道 OS/X 的终端模拟器对选项卡上的颜色有何作用,但如果screen在 中使用 GNU xterm,您可以添加如下内容:
hardstatus string '%D %d %M - %c - %h (%n)^G^[]11;TekHVC:%n10/80/20'
Run Code Online (Sandbox Code Playgroud)
让您~/.screenrc在每个窗口/选项卡/窗格中都有不同的背景颜色screen(但是您想称呼它们)。
screen通过输出如下内容在 xterm 标题栏中显示硬状态:
\e]2;blah\a
Run Code Online (Sandbox Code Playgroud)
上面我们设置了 blah 以包含扩展到窗口号的\a\e]11;TekHVC:%n10/80/20位置,因此对于第一个窗口,它变为:%n
\e]2;...\a\e]11;TekHVC:010/80/20\a
Run Code Online (Sandbox Code Playgroud)
\e]11;...\a是设置背景颜色的 xterm 转义序列。XParseColor它支持X 库支持的各种颜色规范。其中TekHVC:Hue/Value/Chroma的Hue值从 0 到 360(并换行)允许我们为每个窗口选择不同的颜色(10、110、210、310、410(又名 50)、150、250...)