|
64 | 64 | Color schemes
|
65 | 65 | =============
|
66 | 66 |
|
| 67 | +The default color scheme matches the Linux kernel's menuconfig (mconf/lxdialog). |
67 | 68 | It is possible to customize the color scheme by setting the MENUCONFIG_STYLE
|
68 |
| -environment variable. For example, setting it to 'aquatic' will enable an |
69 |
| -alternative, less yellow, more 'make menuconfig'-like color scheme, contributed |
70 |
| -by Mitja Horvat (pinkfluid). |
| 69 | +environment variable. |
71 | 70 |
|
72 | 71 | This is the current list of built-in styles:
|
73 |
| - - default classic Kconfiglib theme with a yellow accent |
| 72 | + - linux style matching the Linux kernel's menuconfig (mconf/lxdialog) [default] |
74 | 73 | - monochrome colorless theme (uses only bold and standout) attributes,
|
75 | 74 | this style is used if the terminal doesn't support colors
|
76 |
| - - aquatic blue-tinted style loosely resembling the lxdialog theme |
77 | 75 |
|
78 | 76 | It is possible to customize the current style by changing colors of UI
|
79 | 77 | elements on the screen. This is the list of elements that can be stylized:
|
|
137 | 135 | to, the assignment will be ignored, along with a warning being printed on
|
138 | 136 | stderr.
|
139 | 137 |
|
140 |
| -The 'default' theme is always implicitly parsed first, so the following two |
| 138 | +The 'linux' theme is always implicitly parsed first, so the following two |
141 | 139 | settings have the same effect:
|
142 | 140 |
|
143 | 141 | MENUCONFIG_STYLE="selection=fg:white,bg:red"
|
144 |
| - MENUCONFIG_STYLE="default selection=fg:white,bg:red" |
| 142 | + MENUCONFIG_STYLE="linux selection=fg:white,bg:red" |
145 | 143 |
|
146 | 144 | If the terminal doesn't support colors, the 'monochrome' theme is used, and
|
147 | 145 | MENUCONFIG_STYLE is ignored. The assumption is that the environment is broken
|
|
284 | 282 | #
|
285 | 283 |
|
286 | 284 | _STYLES = {
|
287 |
| - "default": """ |
288 |
| - path=fg:black,bg:white,bold |
289 |
| - separator=fg:black,bg:yellow,bold |
| 285 | + # Style matching the Linux kernel's menuconfig (mconf/lxdialog) |
| 286 | + # Precisely matches lxdialog's set_bluetitle_theme() and set_classic_theme() |
| 287 | + "linux": """ |
| 288 | + path=fg:white,bg:blue,bold |
| 289 | + separator=fg:black,bg:white |
290 | 290 | list=fg:black,bg:white
|
291 | 291 | selection=fg:white,bg:blue,bold
|
292 | 292 | inv-list=fg:red,bg:white
|
293 |
| - inv-selection=fg:red,bg:blue |
294 |
| - help=path |
295 |
| - show-help=list |
296 |
| - frame=fg:black,bg:yellow,bold |
297 |
| - body=fg:white,bg:black |
298 |
| - edit=fg:white,bg:blue |
299 |
| - jump-edit=edit |
300 |
| - text=list |
| 293 | + inv-selection=fg:red,bg:blue,bold |
| 294 | + help=fg:black,bg:white |
| 295 | + show-help=fg:black,bg:white |
| 296 | + frame=fg:white,bg:blue,bold |
| 297 | + body=fg:black,bg:white |
| 298 | + edit=fg:black,bg:white |
| 299 | + jump-edit=fg:black,bg:white |
| 300 | + text=fg:black,bg:white |
301 | 301 | """,
|
302 | 302 |
|
303 |
| - # This style is forced on terminals that do no support colors |
| 303 | + # This style is forced on terminals that do not support colors |
304 | 304 | "monochrome": """
|
305 | 305 | path=bold
|
306 | 306 | separator=bold,standout
|
|
315 | 315 | edit=standout
|
316 | 316 | jump-edit=
|
317 | 317 | text=
|
318 |
| - """, |
319 |
| - |
320 |
| - # Blue-tinted style loosely resembling lxdialog |
321 |
| - "aquatic": """ |
322 |
| - path=fg:white,bg:blue |
323 |
| - separator=fg:white,bg:cyan |
324 |
| - help=path |
325 |
| - frame=fg:white,bg:cyan |
326 |
| - body=fg:white,bg:blue |
327 |
| - edit=fg:black,bg:white |
328 | 318 | """
|
329 | 319 | }
|
330 | 320 |
|
@@ -617,9 +607,9 @@ def _init_styles():
|
617 | 607 | # seems to be a lot of general brokenness there.
|
618 | 608 | pass
|
619 | 609 |
|
620 |
| - # Use the 'default' theme as the base, and add any user-defined style |
| 610 | + # Use the 'linux' theme as the base, and add any user-defined style |
621 | 611 | # settings from the environment
|
622 |
| - _parse_style("default", True) |
| 612 | + _parse_style("linux", True) |
623 | 613 | if "MENUCONFIG_STYLE" in os.environ:
|
624 | 614 | _parse_style(os.environ["MENUCONFIG_STYLE"], False)
|
625 | 615 | else:
|
|
0 commit comments