Skip to content

Commit 7d1fd62

Browse files
committed
kitty: Add support for missing default color groups
Otherwise the kitty statusline integration was failing with: Custom draw tab function failed with error: invalid literal for int() with base 16: 'g'
1 parent 86be2d4 commit 7d1fd62

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Diff for: doc/tpipeline-kitty.txt

+6-2
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,17 @@ def parse_stl(screen: Screen, draw_data: DrawData, stl: str, draw: bool):
7373
fmt = stl[pos+1:next].split(",")
7474
for f in fmt:
7575
if f.startswith("fg="):
76-
if f == "fg=default":
76+
if f == "fg=default" or f == "fg=terminal":
7777
screen.cursor.fg = as_rgb(int(draw_data.default_fg))
78+
elif f == "fg=bg":
79+
screen.cursor.fg = screen.cursor.bg
7880
else:
7981
screen.cursor.fg = as_rgb(int(f[4:10], 16))
8082
elif f.startswith("bg="):
81-
if f == "bg=default":
83+
if f == "bg=default" or f == "bg=terminal":
8284
screen.cursor.bg = as_rgb(int(draw_data.default_bg))
85+
elif f == "bg=fg":
86+
screen.cursor.bg = screen.cursor.fg
8387
else:
8488
screen.cursor.bg = as_rgb(int(f[4:10], 16))
8589

0 commit comments

Comments
 (0)