-
Notifications
You must be signed in to change notification settings - Fork 156
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
Tentative request: Add themeing support to menuconfig #52
Comments
A 5th option would be to do it programmatically from a python script (for example, by allowing to override the _init_styles() function) |
6th option might be to make the default less ugly. I did my best with it, but I'm not exactly Rembrandt. That yellow color in particular probably isn't the prettiest thing in the world... If someone comes up with a nicer color scheme (or other UI improvement), I'm happy to take it in. Not sticking to just the predefined colors might help too. The C menuconfig gets decent looks from using lxdialog, but I don't like how it wastes terminal space, and resizing is super janky (including a segfault if you accidentally make the window too small). |
I don't think it's ugly, actually it's pretty decent even for Rembrandt standards. The problem is that when I present this to other people they expect the ctools "kconfig" theme. So I was hoping to customize it with colors that are more in-line with the project so instead of a "uh, huh... why is it yellow?" questions I would get more "Oh, cool" reactions :) It's not super important, so if you think it's pointless to have, please close the issue. |
I tried to go for the Could you try tweaking the colors manually in |
Search for "predefined" in https://docs.python.org/3/library/curses.html to see the list of predefined colors. Might be able to use |
I will give it a shot. I thought init_color() was only for RGB-type colors (some terminals do support that). I might try with the standard 16 colors at first, see how far I get. |
Ok, this is what I came up with. Frankly, it looks more like Norton Commander than lxdialog :) As you said, it's really hard to match the lxdialog scheme because of the borders and all that. Anyway, here's the patch:
|
Doesn't look all too shabby. Bit more relaxed to compared to the other theme. Maybe I could add it as an alternate theme, enabled in the environment via I like that you bolded the selected item. Might steal that for the other theme as well. Here's how it comes out on gnome-terminal: |
Actually looks OK even on gnome terminal. Regarding fine-grained styling -- I believe it's up to the user to maintain the compatibility with newer versions. If they choose to upgrade kconfiglib, they should be aware that their custom theme may require tweaking. In any case, reverting to the default theme should be straightforward. But again, this is a nice to have feature, but far from being essential. Truthfully, the only issue with the yellow theme is that people usually associate kconfig with the lxdialog color scheme and think that I purposedly changed it to yellow for some reason :) |
Added the new theme: 84bd863 I tweaked the colors for dialog boxes and the jump-to dialog to make them a bit more readable. Check if looks alright. Got lazy and went for a hardcoded version for now. Might add some external styling mechanism later, if more styles show up. |
Looks great, thank you! You can close this issue. |
Alright, closing. Thanks! Pushed out a new release with the theme too. |
This is my last request, I promise :)
It would be nice if it was possible to change the color scheme of menuconfig. I'm not exactly sure what would be the best way to do it, but here are a couple options that come to mind:
The first 3 are self explanatory. The last option, could be something like Vim modeline that allows settings things like TAB size from the Kconfig file comments, for example:
The above color definition syntax is somewhat loosely resembling python blessings (https://github.com/erikrose/blessings). The definition after "," is the 4th column for _style().
If there's no plans for this whatsoever, please close the issue :)
The text was updated successfully, but these errors were encountered: