如何更改透明窗口中的字体/背景颜色?

Mik*_*kov 5 colors terminal

当您选择某些内容时,选择的颜色通常会更改为字体颜色,并且字体颜色被设置为背景颜色。因此,如果您在终端中有黑色背景,并且字体为橙色,您将获得橙色选择和黑色字体颜色。

如果你有一个透明的窗口,并且透明度设置为 100%,会发生什么?看看下面的图片。

黑色背景的那个:

图片

还有透明的:

图片

有没有办法改变透明窗口的字体/背景颜色?

Mik*_*kov 2

我找到了解决方案。有两个可以使用的参数(添加到~/.Xresources文件中):

URxvt*highlightColor:       #000000
URxvt*highlightTextColor:   #D75F00
Run Code Online (Sandbox Code Playgroud)

解释如下:

   highlightColor: colour
       If set, use the specified colour as the background for highlighted
       characters. If unset, use reverse video.

   highlightTextColor: colour
       If set and highlightColor is set, use the specified colour as the
       foreground for highlighted characters.
Run Code Online (Sandbox Code Playgroud)

现在完全透明窗口上选定的文本如下所示:

照片

  • 这使得选定的文本可读,但实际的反向视频仍然不可读。 (3认同)