如何更改运行XTERM的默认颜色?

发布于 2025-02-07 22:11:52 字数 229 浏览 1 评论 0原文

当您启动Xterm时,其默认颜色由.xdefaults或-fg和-bg选项确定。这些是此特定Xterm流程的默认值。如果您使用ANSI序列更改颜色,则在发送ANSI重置序列时,您会回到其启动的颜色。

我想更改的是此特定Xterm流程的默认值。实际上,我想用新的-fg和-bg选项重新执行Xterm命令。

是否可以选择重置默认颜色,而不是当前的颜色?

When you start an xterm, its default colors are determined by .Xdefaults OR --fg and --bg options. Those are the defaults for this particular xterm process. If you then change colors with ansi sequences, when you send the ansi reset sequence, you get back to the colors it started up with.

What I want to change is the defaults for this particular xterm process. I want to, in effect, re-exec the xterm command with a new set of --fg and --bg options.

Is there an option to reset the default colors, not the current colors?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

瘫痪情歌 2025-02-14 22:11:53

动态颜色功能执行此操作(在正常的逃生序列中未获得“重置”,使用“ ANSI” ESCAPES):

可以使用1 0设置或查询的10种颜色(下图)
直到1 9被表示动态颜色,因为
相应的控制序列是第一种
将Xterm的颜色动态设置,即
开始。它们与ANSI颜色不同(但是,
使用动态文本前景和背景颜色
当使用SGR 3 9和4 9重置ANSI颜色时,
分别)。

The dynamic colors feature does that (does not get "reset" in the normal escape sequences, which use "ANSI" escapes):

The 10 colors (below) which may be set or queried using 1 0
through 1 9 are denoted dynamic colors, since the
corresponding control sequences were the first means for
setting xterm's colors dynamically, i.e., after it was
started. They are not the same as the ANSI colors (however,
the dynamic text foreground and background colors are used
when ANSI colors are reset using SGR 3 9 and 4 9 ,
respectively).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文