fishiterm2oh-my-fish

How to set background default color in fish shell?


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: Manually setting background with 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

Solution

  • 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.