New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Git segment color properties have no effect #161
Comments
I think this is because that doesn't support the non hex colors yet. Let me check. If you change this to a hex color, does it show the color? I have this working on the latest version. |
I've tried changing my config to: {
"type": "git",
"style": "powerline",
"powerline_symbol": "",
"invert_powerline": false,
"foreground": "black",
"background": "lightGreen",
"leading_diamond": "",
"trailing_diamond": "",
"properties": {
"display_stash_count": true,
"display_upstream_icon": true,
"color_background": true,
"status_colors_enabled": true,
"working_color": "#f0f0f0",
"local_changes": "#f0f0f0"
}
}, Looks like hex colors did something! Edit: If what I just described is something that the "color_background" property is meant to do, I guess it could possibly be an issue with that as well. |
That's exactly what it does and does so on my setups, also with the 16 colors. I'll check if I misread something in the thread when I have more time. |
Yes, that's exactly what this does :-) With this config on {
"type": "git",
"style": "powerline",
"powerline_symbol": "",
"foreground": "black",
"background": "lightGreen",
"properties": {
"display_stash_count": true,
"display_upstream_icon": true,
"status_colors_enabled": true,
"color_background": true,
"local_changes_color": "lightBlue",
"ahead_and_behind_color": "#f26d50",
"behind_color": "#f17c37",
"ahead_color": "#89d1dc",
"stash_count_icon": "\uF692 "
}
} So as far as I can see this work according to design. |
@turtlebasket it does not work because you set a color to |
Oh, my bad. Besides support for non-hex colors (which you've already added), I think that covers it, then! |
Thanks for clarifying this, I spent like half an hour trying to figure out how it works, because it's not 100% clear what color are the parameters affecting (foreground/background - I didn't get that it's affected by |
I'll rewrite the docs, this information is very valuable as I write from my perspective (which is biased). |
Prerequisites
CONTRIBUTING
guideDescription
My configuration for the
git
segment is as follows:When I change the color properties for "working_color", "local_changes", etc. and then enter a local git repo with changes, the prompt only shows the original color.
NOTE: The number of changed files does show in the git segment, and altering other properties like the branch icon still works, which is why I believe it's an issue with the git colors specifically.
(My config changes were based on reading the documentation. It's a bit sparse, but that's understandable, given how new and quickly-evolving this project is. If it turns out I'm just doing something seriously wrong here or missing something, perhaps the section about git segment colors could specify what else needs to be set beforehand.)
Environment
Oh my Posh version: 3.35.0 beta
Theme: Custom (see git segment config above)
Operating System: Windows 10 Enterprise
Shell: Powershell 7.1
Terminal: Windows Terminal
Steps to Reproduce
Expected behavior: Upon setting
status_colors_enabled
to true and changingworking_color
andlocal_changes
to lightYellow, the git status color should change to lightYellow when inside a git repo with changed files.Actual behavior: Upon setting
status_colors_enabled
to true and changingworking_color
andlocal_changes
to lightYellow, the git status color does not change to lightYellow when inside a git repo with changed files.The text was updated successfully, but these errors were encountered: