A new option second_transparent_bg

Makes a second background color semi-transparent via background_opacity.
Useful for things like cursor line highlight in editors.

Fixes #7646
This commit is contained in:
Kovid Goyal
2024-07-21 20:22:31 +05:30
parent 573058d861
commit 0cf9a79760
25 changed files with 293 additions and 314 deletions

View File

@@ -42,7 +42,6 @@ def patch_color_list(path: str, colors: List[str], name: str, spc: str = ' ')
def main(args: List[str]=sys.argv) -> None:
from kitty.options.definition import definition
write_output('kitty', definition)
nullable_colors = []
all_colors = []
for opt in definition.iter_all_options():
@@ -52,9 +51,10 @@ def main(args: List[str]=sys.argv) -> None:
all_colors.append(opt.name)
elif opt.parser_func.__name__ in ('to_color', 'titlebar_color', 'macos_titlebar_color'):
all_colors.append(opt.name)
patch_color_list('kitty/rc/set_colors.py', nullable_colors, 'NULLABLE')
patch_color_list('tools/cmd/at/set_colors.go', nullable_colors, 'NULLABLE')
patch_color_list('tools/themes/collection.go', all_colors, 'ALL')
nc = '\n '.join(f'{x!r}' for x in nullable_colors)
write_output('kitty', definition, f'\nnullable_colors = frozenset({{\n {nc}\n}})')
if __name__ == '__main__':