feat(config): add named configuration profiles
Profiles declared as `profile <name> { ... }` in kitty.conf are now collected
while the configuration is read and applied only when selected, so switching
between projects no longer requires duplicating or editing kitty.conf.
The selected profile is layered over the global configuration, meaning it only
overrides the options it declares. Selection happens with --profile or
KITTY_PROFILE, reloading keeps the active profile, and an unknown or malformed
profile is reported without blocking startup.
This commit is contained in:
9 files changed
+303
-9
No files matched your search
+1
-1
@@ -3700,7 +3700,7 @@ class Boss:
|
||||
final_overrides = old_opts.config_overrides if apply_overrides else ()
|
||||
if overrides:
|
||||
final_overrides += tuple(overrides)
|
||||
opts = load_config(*paths, overrides=final_overrides or None, accumulate_bad_lines=bad_lines)
|
||||
opts = load_config(*paths, overrides=final_overrides or None, accumulate_bad_lines=bad_lines, profile=old_opts.profile_name or None)
|
||||
if bad_lines:
|
||||
self.show_bad_config_lines(bad_lines)
|
||||
from .fonts.render import clear_font_caches
|
||||
|
||||
Reference in new issue
Block a user