-
Notifications
You must be signed in to change notification settings - Fork 7.1k
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
Default menuconfig colors incompatible with KDE's Konsole default color scheme (IDFGH-2238) #4387
Comments
Please let us know which setup works for you the best. I plan to make this customizable. |
Hi!, menuconfig: some recent changes seem to cause (me) problems (on a default debian10 vm). latest git, ./install and ./export checked. a simple
any ideas? thanks! |
@drtyhlpr You have to set the TERM environment variable for your terminal. Something like Note: There will be a warning message about this in |
thanks for your fast solution! |
@drtyhlpr FWIW, I recommend the default theme in a cross-platform environment, because I've made sure it's legible on Windows (though this is Konsole on a second look... hopefully it's legible there too). I know it's a bit yellow, but it seemed like the least ugly option that avoids color-clashing with just ANSI colors (try de-yellowing it and you might see what I mean). :) |
@dobairoland Switching to the default theme would indirectly solve that, because it only uses 6 color pairs. I wonder if I should have the color pairs wrap on gimped terminals. Might break the display in random ways depending on theme, but it might be better than crashing still. Another option might be to use monochrome on those. Maybe aquatic could be tweaked to use less color pairs too... |
Oh, wait, I had misremembered what This patch fixes it, for e.g. diff --git a/menuconfig.py b/menuconfig.py
index 1f2e9fa..3a56d52 100755
--- a/menuconfig.py
+++ b/menuconfig.py
@@ -318,7 +318,7 @@ _STYLES = {
separator=fg:white,bg:cyan,bold
help=path
frame=fg:white,bg:cyan,bold
- body=fg:brightwhite,bg:blue
+ body=fg:white,bg:blue
edit=fg:black,bg:white
"""
} Will add some version of that upstream tomorrow. |
The bright colors in the range 8-15 are not ANSI and are not guaranteed to be available. Previously, the code assumed that all named colors are always available on color terminals, and skipped the check against curses.COLORS. This led to this error e.g. with TERM=xterm (as opposed to xterm-256color) and the aquatic theme, which uses 'brightwhite': _curses.error: init_pair() returned ERR Fix it by checking the number returned for named colors against curses.COLORS as well. Came up in espressif/esp-idf#4387.
Not available with TERM=xterm (as opposed to xterm-256color). Use fg:white instead of fg:brightwhite for dialog box bodies. Not a huge difference. Came up in espressif/esp-idf#4387.
Fixed the code to avoid the crash @drtyhlpr saw, in ulfalizer/Kconfiglib@7a98bc7. Also changed the aquatic theme to not include 'brightwhite', in ulfalizer/Kconfiglib@1ad02f5. Re. the original issue, check if the default theme might be a better default than aquatic. I'm happy to take in any theme tweaks upstream too. |
Thank you @ulfalizer for fixing the aquatic color theme in upstream kconfiglib. Now "xterm" or "screen" values of TERM environment variable is sufficient to use our default blue menuconfig. "xterm-256color" or "screen-256color" was necessary before this fix. See #4387 (comment)
FYI, I just updated the aquatic theme to avoid cyan-on-blue for the path row and help text (and removed bold text, because it looks a bit cleaner IMO). It's white-on-blue now instead. |
Thank you @ulfalizer for fixing the aquatic color theme in upstream kconfiglib. Now "xterm" or "screen" values of TERM environment variable is sufficient to use our default blue menuconfig. "xterm-256color" or "screen-256color" was necessary before this fix. See espressif/esp-idf#4387 (comment)
Almost impossible to see the footnote instructions.
![lol](https://user-images.githubusercontent.com/4423144/69345296-a9dcf000-0c4f-11ea-96b5-28ff06e3612e.png)
The text was updated successfully, but these errors were encountered: