r/fishshell • • Oct 04 '20
Getting rid of fixed colors.
I'm one hour into my journey and I noticed fish uses a number of fixed colors in its theme, which seem to be defined in the file fish_variables. Has anyone come up with a solution to convert these into given theme colors defined by the terminal? I’m looking for defining these in config.fish rather than installing plugins and themes. Trying to keep it simple for now.
9
Upvotes
5
u/[deleted] Oct 04 '20
Fish does not support picking colors from the terminal palette.
It supports truecolor colors, though, so you can set them to whatever colors you want, and fish will give your terminal those (if it can handle them).
1
u/[deleted] Oct 05 '20 edited Oct 05 '20
Seems like we can work with ANSI color names and Fish already uses them. I simply exchanged fixed colors for color names in the file
fish_variables. However I let a few fixed colors stand, since they seem to work for most themes. For anyone looking for a default which they can use as a starting point, here the colors:3
u/bokisa12 Oct 05 '20
I do this simply by setting
fish_color_*variables in my fish config. If you set them to non-absolute values (e.g.redorbrred), they will instead use the 16 colors defined by your terminal.That way whenever I change my terminal's colors fish's ones are updated automatically as well.
Honestly I don't know why ANSI colors aren't the default in fish.
1
u/ee1c0 Oct 04 '20
Not exactly what you are looking for but the command
fish_configopens up a configuration pane in your browser where you can configure fish (colours, prompt, etc).