I use a colorscheme with a quite bright blue color which leads to the statusbar being basically unreadable.
I found this pr but they also only added hardcoded values. Is there any simple way to add support for colors? Maybe through xresources or something even?
Michael Muré (MichaelMure) changed the title from termui: configurable color scheme to Make colors of termui status bar configurable
Michael Muré (MichaelMure) commented
I'm still looking for the right way to do those things. From the app itself, I have no idea what kind of theme is used.
AtomToast (AtomToast) commented
Have you just considered letting the users define colors for the application on their own? Maybe even with 256 or truecolor support.
However I am aware that the application currently doesn't appear to have any kind of config file. Which is why I suggested xresources, however this probably isn't perfect either, since some people may be running wayland or no graphical server at all
Zdenek Crha (zdenek-crha) commented
I would second the request to make color scheme configurable. I use terminal config with bright background and there are parts of the tui that are not only hard to read, but impossible to read:
That black rectangle in the screenshot above contains text "No description provided.", but the only way to find that is to open git-bug in different terminal with dark background.
As for configuration, why not use .gitconfig to do that? I see following advantages:
it is configuration file all git users know
having config for all git related tools in one place is nice
git-bug stores git-bug.identity in there so there should already be way to access it from code
git has color section that could be used for somegit-bug elements
git-bug.ui section could store colors for elements missing from default color
Michael Muré (MichaelMure) commented (edited)
One thing that could be tried before that is to always set both foreground and background color, and not use the "default" color.
Zdenek Crha (zdenek-crha) commented
@MichaelMure That could work.
The only thing I would be worried about is default terminal bg color 'leaking' in places and causing patches and artifacts in display. Fixing all those leaks may be more expensive than implementation of color scheme loading. But there is no way to know if that happens without trying it out.
AtomToast (AtomToast) commented
I really like the first idea of zdenek. Foreground and background color aren't always reliable since for example in my colorscheme (monokai) both the foreground color and the blue are bright colors
Michael Muré (MichaelMure) commented
@AtomToast have you tried #457 ? Could you show what it looks like for you?
I'd be happy to have a way to configure those colors, I just don't have the bandwidth to take care of it. Now, another problem on the horizon is that access to git is being migrated to go-git instead of launching git CLI commands, and go-git does not read the global config file at all :-|
Michael Muré (MichaelMure) commented
Although it would be possible to still use the git CLI to read the global config. I guess I can live with that little mess.
AtomToast (AtomToast) commented
as far as I can tell there is no difference for me in his branch. However from just randomly changing the BlueBg to YellowBg in termui/help_bar.go it already becomes much more readable. At least in my colorscheme.
Michael Muré (MichaelMure) commented
#457 is merged, which should improve things a bit.
Now, another problem on the horizon is that access to git is being migrated to go-git instead of launching git CLI commands, and go-git does not read the global config file at all :-|
This particular problem is fixed in #412 (soon to be merged) so it will still be possible to read the global config and thus implement a configurable color scheme.
Michael Muré (MichaelMure) changed the title from Make colors of termui status bar configurable to termui: configurable color scheme
Michael Muré (MichaelMure)
added label
enhancement
Michael Muré (MichaelMure)
added label
area/ui/terminal
Sascha (GlancingMind) commented
Wouldn't it be better to ship the terminal UI with a simple black and white color scheme (except for label)?
E.g. default terminal background and default terminal font color.
Then the colors should not conflict with the users terminal color scheme.
If preferred, the colors could still be changed with a configuration file or within the git config.