romkatv / powerlevel10k

A Zsh theme
MIT License
46.69k stars 2.2k forks source link

Git background status colours for staged/untracked/modified not working #2765

Closed wezlar closed 1 month ago

wezlar commented 2 months ago

I'm trying to get the status colour of git repositories to change between clean, tracked and untracked, modified, or whatever term is meant to be used. This seems like it's meant to work by default but for some reason, I cannot get this to happen. The colours for git status seem to change on either side of running git add . but I'd like the background colour of the git branch in the terminal to also change as well.

I've rerun the configuration several times, played between clean and rainbow styles, and checked the iTerm2 theme colours. I've also tried modifying both the foreground and background colours in .p10k.zsh but nothing seems to have an impact. Where am I going wrong?

Is there something else I need to check? Is something else getting in the way? I've disabled all other plugins to be sure, and even reinstalled oh-my-zsh. I've also tried toggling POWERLEVEL9K_VCS_DISABLE_GITSTATUS_FORMATTING=false which didn't seem to do anything either. Any advice would be greatly appreciated, I love the style Powerlevel10k gives me and this is the one thing that I want to alter with my current setup.

image

romkatv commented 2 months ago

The screenshot shows a non-clean repo, and that gets yellow background. Does it turn green in a clean repo?

wezlar commented 2 months ago

@romkatv Yes it does turn green for a clean repo, but is there a way to have a different colour between having files staged and unstaged? The .p10k.zsh seems to indicate there is a clean, untracked and modified state, but I can only seem to trigger 2 of these three states. Maybe I'm not understanding when those are in effect properly.

romkatv commented 2 months ago

is there a way to have a different colour between having files staged and unstaged?

No.

I can only seem to trigger 2 of these three states.

Start with a clean repo and type touch blah. That's untracked state.

romkatv commented 2 months ago

You might want to try Lean style. If your goal is functional setup, Lean is better than Rainbow.