0

I have omf, git plugins + agnoster theme installed. When I do git status, the files "not staged for commit" are listed in bright red color. So much so that I can barely read them, given my background setting.

I am wondering where this color is set. I have already changed "fish_color_error" & "theme_color_error" and those do not make a difference here.

On a related note, both "red" and "white" colors are always displayed in bold fonts. What is the suggested way to change them to normal fonts?

Thank you for your time.

torek
  • 448,244
  • 59
  • 642
  • 775
ShankarSwamy
  • 106
  • 1
  • 9
  • Git doesn't look at anyone else's color scheme, it has its own private system. To change a Git color, read [the `git config` documentation](https://git-scm.com/docs/git-config) (warning: it's HUGELY HORRIBLY LONG) and search for the keyword "color". – torek Apr 16 '22 at 20:42
  • Update: files not staged for commit were apparently displayed in the "error color" set in fish. I changed that color to something more readable. But that only changed the display of file names not staged ONLY in the Konsole terminal and the Terminator window still shows it in unreadable red color! Termcap & color info are set identical in both cases - they are set by the shell. Not sure why the terminator window is picking up red color instead of what is set in my config.fish file. – ShankarSwamy Apr 20 '22 at 02:15
  • 1
    Git uses ESC [ m sequences for color setting, for the usual `TERM` values (xterm, xterm-256color, etc). That's an ISO/ECMA/ANSI standard sequence and the eight basic colors that Git knows are all standard, but they display differently in different terminal emulators. See [here](https://stackoverflow.com/q/4842424/1256452) for some details. – torek Apr 20 '22 at 07:57
  • 1
    If you set, e.g., `color.status.unstaged` to `blue` Git will use ESC [ 34 m here. You can set each color.status.* field to a different value, using the colors described in the Git documentation, including words like `bold` or `reverse` for controlling additional escape sequence options. – torek Apr 20 '22 at 08:01

1 Answers1

0

As it turns out, these colors are set by the agnoster theme (in my case - your themes may vary). And I had to put the following in my ~/.config/fish/config.fish file to override the offending default colors.

## Override agnoster default colors:
set -g color_dir_bg 617387 
set -g color_dir_str cccccc
set -g color_git_dirty_bg FFC58A
set -g color_git_bg 8EF08E

You can check in .local/share/omf/themes/agnoster/functions/fish_prompt.fish file to see what other colors are customized by agnoster.

ShankarSwamy
  • 106
  • 1
  • 9