-
Notifications
You must be signed in to change notification settings - Fork 114
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
Change background colour based on Git status #163
Comments
I'm certainly open to the idea, but I don't want to have a separate color for every single state. That seems kind of "mentally busy" to me, in that people wouldn't remember which color corresponds to which, and what the chain of priority is. Bobthefish only has colors for normal and dirty right? I'd suggest we do similarly. One for normal, one for dirty, and one for conflicted/ongoing operation. Thoughts? |
Hi @IlanCosman, Thanks for your reply! I totally agree about having too many colours and it being too mentally busy. Personally, I only really care if it is clean / dirty / conflicted but I wasn't sure if others had more sophisticated needs. I think 3 different colours would be sufficient because there are always the other indicators that give more fine-grained detail about the status. In my opinion, conflicted deserves its own unique colour so I would suggest the following:
One thing I'm not totally sure about is if untracked files should trigger the dirty colour or not... My logic is that untracked files are a signal that requires some attention so that they can either be added or ignored. Does that make sense? |
Sorry for the delay 😅 I hadn't realized that P10k does this, but apparently it does, so perhaps we should take what it does under consideration: P10k: Here's what it looks like in action: The red on green clashes really badly, and using a red foreground to convey information when we use background for everything else seems a bit weird. I agree with your assessment of untracked files, though both P10k and Bobthefish disagree. So here's my proposal (which is quite similar to yours):
|
Your proposal makes perfect sense to me and I'd be happy if it worked like that 👍 I agree about not using different foreground colours to convey meaning when background colours are in use. I think the only time the text colour should change from the default is to provide better contrast against the background colour, if necessary. By the way, it's a bit of a tangent but have you seen https://github.com/jandedobbeleer/oh-my-posh? I came across it recently and there are some potentially interesting ideas in the way it is constructed - for example, the handling of themes via JSON. I thought you might be interested if you're not already aware of it. |
Is your feature request related to a problem? Please describe
In the Rainbow prompt style it would be really nice if the background colour could also be changed depending on the Git status (like in bobthefish)
Describe the solution you'd like
I've already experimented with this by editing
_tide_item_git.fish
but rather than submitting a pull request, I thought this was better as a feature request because there might be some debate about the best way to handle it. For example, there can only be one background colour at a time so when there are multiple different statuses, there would need to be a priority for which colour was used.I was thinking of something like this, added just before the information is printed:
This is just a quick attempt - the extra variables would need to be defined in the presets and maybe there's a more elegant way of doing this. I welcome any feedback!
Additional context
A quick example of how it might look...
What do you think?
The text was updated successfully, but these errors were encountered: