jesseduffield / lazygit

simple terminal UI for git commands
MIT License
52.81k stars 1.85k forks source link

Set default color to icons/folders the LazyVim way, how to ? #3863

Open avario-cpu opened 2 months ago

avario-cpu commented 2 months ago

image Ugly, lifeless sad "default" icon/folder color 😢 (My pwsh version of lazygit v.0.43.1)

image Powerful, inspiring, beautiful colorful "default" icon/folder ! 😮 (Lazygit nvim integrated floating window, included by default in the LazyVim distro)

So ...

How to ?

Did it imply leveraging nvim way of drawing and is therefore not possible on term ? Can I hack something to have this effect without using the .yaml which doesnt seem to support this ?

Does the config.yml support that and I'm a blind idiot !?

avario-cpu commented 2 months ago

image Aight listen I don't know what I've done but it suddenly works so... 🤷

avario-cpu commented 2 months ago

Nevermind it lasted like 5 seconds of euphoria ...

georgeguimaraes commented 2 months ago

Assuming you're using TokyoNight Moon since it's the default for Lazyvim:

echo -ne "\033]4;241;rgb:65/bc/ff\007" && lazygit

This overwrites the ANSI color 241 to a blueish color. I ended writing this color overwrite in my .zshrc so I don't need to set it in an alias or something.

georgeguimaraes commented 2 months ago

If you want to print all 256 ANSI colors: for i in {0..255}; do printf "\e[48;5;%sm%3d" $i $i; (((i+1) % 16)) || printf "\e[0m\n";

SCR-20240903-rfhd
avario-cpu commented 2 months ago

Thanks a lot for the input, forgot to say that I'm on windows as I kind of expected this to be sort of a config file thing ... I do have the nice blue, but only sometimes, hard to tell when but it's def a lot more often inside the floating term in nvim. I will look into that and try some pwsh equivalent + try to connect the dots as to what might be passed as an arg in the command LazyVim uses !

stefanhaller commented 2 months ago

LazyVim passes its own config file to lazygit in addition to the user's normal config file; that's where they override the colors. Press 1 e in lazygit to get a menu with all config files that are loaded; the first one is your normal one, the second is LazyVim's.

avario-cpu commented 2 months ago

LazyVim passes its own config file to lazygit in addition to the user's normal config file; that's where they override the colors. Press 1 e in lazygit to get a menu with all config files that are loaded; the first one is your normal one, the second is LazyVim's.

Yes I've already copy pasted that config file to see if it was the culprit but it wasn't apparently, still got the greyed out icons. It appears there is no explicit option to set that anywhere in the yaml file.

I probably have to look for some kind of default grey terminal color replacement in the LazyVim source code that would be defined when iniating the FloatTerm plugin there use for the integrated term.

georgeguimaraes commented 2 months ago

I probably have to look for some kind of default grey terminal color replacement in the LazyVim source code that would be defined when iniating the FloatTerm plugin there use for the integrated term.

https://github.com/LazyVim/LazyVim/blob/3dbace941ee935c89c73fd774267043d12f57fe2/lua/lazyvim/util/lazygit.lua#L91-L93

avario-cpu commented 2 months ago

https://github.com/LazyVim/LazyVim/blob/3dbace941ee935c89c73fd774267043d12f57fe2/lua/lazyvim/util/lazygit.lua#L91-L93

Yes thank you 🙏 I'll post my implementation as soon as I figured it out