Skip to content

Commit 428b26b

Browse files
committed
fix windows menuconfig style support
1. back is not the color name in _NAMED_COLORS 2. windows terminal python enviroment not support the -1 as the color
1 parent 62142a0 commit 428b26b

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

Makefile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,15 @@ endif
179179

180180
# Menuconfig
181181
.PHONY: config
182+
KCONFIGLIB_AVAILABLE := $(shell python3 -c "import kconfiglib" >/dev/null 2>&1 && echo 1 || echo 0)
183+
182184
config: configs/Kconfig
185+
ifeq ($(KCONFIGLIB_AVAILABLE),1)
186+
@echo ">>> Using Kconfiglib"
187+
@python3 -m menuconfig $<
188+
@python3 -m genconfig $<
189+
else
190+
@echo ">>> Falling back to local tools"
183191
@tools/kconfig/menuconfig.py $<
184192
@tools/kconfig/genconfig.py $<
193+
endif

tools/kconfig/menuconfig.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@
285285

286286
_STYLES = {
287287
"default": """
288-
path=fg:white,bg:back,bold
288+
path=fg:white,bg:black,bold
289289
separator=fg:white,bg:blue,bold
290290
list=fg:white,bg:black
291291
selection=fg:black,bg:white,bold

0 commit comments

Comments
 (0)