如何在鱼壳中设置背景默认颜色?
具体来说,我想将默认的背景颜色设置为我的鱼壳中的iterm2中的“太阳化的深色”。
目前,每次使用cmd + i
启动鱼壳时,我都必须手动更改背景:
无论如何都可以设置此设置,以使设置为保存?
我的fish_variables文件现在看起来像这样:
# This file contains fish universal variable definitions.
# VERSION: 3.0
SETUVAR __fish_initialized:3400
SETUVAR fish_color_autosuggestion:586e75
SETUVAR fish_color_cancel:\x2d\x2dreverse
SETUVAR fish_color_command:93a1a1
SETUVAR fish_color_comment:586e75
SETUVAR fish_color_cwd:green
SETUVAR fish_color_cwd_root:red
SETUVAR fish_color_end:268bd2
SETUVAR fish_color_error:dc322f
SETUVAR fish_color_escape:00a6b2
SETUVAR fish_color_history_current:\x2d\x2dbold
SETUVAR fish_color_host:normal
SETUVAR fish_color_host_remote:\x1d
SETUVAR fish_color_keyword:\x1d
SETUVAR fish_color_match:\x2d\x2dbackground\x3dbrblue
SETUVAR fish_color_normal:normal
SETUVAR fish_color_operator:00a6b2
SETUVAR fish_color_option:\x1d
SETUVAR fish_color_param:839496
SETUVAR fish_color_quote:657b83
SETUVAR fish_color_redirection:6c71c4
SETUVAR fish_color_search_match:bryellow\x1e\x2d\x2dbackground\x3dblack
SETUVAR fish_color_selection:white\x1e\x2d\x2dbold\x1e\x2d\x2dbackground\x3dbrblack
SETUVAR fish_color_status:red
SETUVAR fish_color_user:brgreen
SETUVAR fish_color_valid_path:\x2d\x2dunderline
SETUVAR fish_key_bindings:fish_default_key_bindings
SETUVAR fish_pager_color_background:\x1d
SETUVAR fish_pager_color_completion:B3A06D
SETUVAR fish_pager_color_description:B3A06D
SETUVAR fish_pager_color_prefix:cyan\x1e\x2d\x2dunderline
SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan
SETUVAR fish_pager_color_secondary_background:\x1d
SETUVAR fish_pager_color_secondary_completion:\x1d
SETUVAR fish_pager_color_secondary_description:\x1d
SETUVAR fish_pager_color_secondary_prefix:\x1d
SETUVAR fish_pager_color_selected_background:\x2d\x2dbackground\x3dbrblack
SETUVAR fish_pager_color_selected_completion:\x1d
SETUVAR fish_pager_color_selected_description:\x1d
SETUVAR fish_pager_color_selected_prefix:\x1d
Specifically, I want to set the default background color to "Solarized Dark" in my fish shell for Iterm2.
Currently, I have to manually change the background every time I start my fish shell using CMD + I
:
Is there anyway to set this such that the settings are saved?
My fish_variables file looks like this now:
# This file contains fish universal variable definitions.
# VERSION: 3.0
SETUVAR __fish_initialized:3400
SETUVAR fish_color_autosuggestion:586e75
SETUVAR fish_color_cancel:\x2d\x2dreverse
SETUVAR fish_color_command:93a1a1
SETUVAR fish_color_comment:586e75
SETUVAR fish_color_cwd:green
SETUVAR fish_color_cwd_root:red
SETUVAR fish_color_end:268bd2
SETUVAR fish_color_error:dc322f
SETUVAR fish_color_escape:00a6b2
SETUVAR fish_color_history_current:\x2d\x2dbold
SETUVAR fish_color_host:normal
SETUVAR fish_color_host_remote:\x1d
SETUVAR fish_color_keyword:\x1d
SETUVAR fish_color_match:\x2d\x2dbackground\x3dbrblue
SETUVAR fish_color_normal:normal
SETUVAR fish_color_operator:00a6b2
SETUVAR fish_color_option:\x1d
SETUVAR fish_color_param:839496
SETUVAR fish_color_quote:657b83
SETUVAR fish_color_redirection:6c71c4
SETUVAR fish_color_search_match:bryellow\x1e\x2d\x2dbackground\x3dblack
SETUVAR fish_color_selection:white\x1e\x2d\x2dbold\x1e\x2d\x2dbackground\x3dbrblack
SETUVAR fish_color_status:red
SETUVAR fish_color_user:brgreen
SETUVAR fish_color_valid_path:\x2d\x2dunderline
SETUVAR fish_key_bindings:fish_default_key_bindings
SETUVAR fish_pager_color_background:\x1d
SETUVAR fish_pager_color_completion:B3A06D
SETUVAR fish_pager_color_description:B3A06D
SETUVAR fish_pager_color_prefix:cyan\x1e\x2d\x2dunderline
SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan
SETUVAR fish_pager_color_secondary_background:\x1d
SETUVAR fish_pager_color_secondary_completion:\x1d
SETUVAR fish_pager_color_secondary_description:\x1d
SETUVAR fish_pager_color_secondary_prefix:\x1d
SETUVAR fish_pager_color_selected_background:\x2d\x2dbackground\x3dbrblack
SETUVAR fish_pager_color_selected_completion:\x1d
SETUVAR fish_pager_color_selected_description:\x1d
SETUVAR fish_pager_color_selected_prefix:\x1d
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
而不是在会话首选项中设置颜色(通过 + i ),将它们保存为配置文件偏好( ++, 并选择配置文件)。如果您不想将其用于所有终端外壳会话,则可以创建一个新的配置文件,该配置文件也可以通过更改常规配置文件首选项中的命令来启动鱼类。
Rather than setting the colors in your session preferences (via ⌘+I), save them as the profile preferences (⌘+, and choose Profiles). If you don't want to use this for all your terminal shell sessions, you can create a new profile which also starts fish by changing the Command in the General profile preferences.
没有标准的方式告诉终端设置背景颜色,因此鱼不支持终端设置背景颜色。
您必须将其设置在终端。
There is no standard way to tell the terminal to set the background color, so fish has no support to tell the terminal to set the background color.
You'll have to set it in your terminal.