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
@@ -737,7 +737,7 @@ def create_opts(args: CLIOptions, accumulate_bad_lines: list[BadLineType] | None
|
||||
|
||||
config = default_config_paths(args.config)
|
||||
overrides = map(parse_override, args.override or ())
|
||||
opts = load_config(*config, overrides=overrides, accumulate_bad_lines=accumulate_bad_lines)
|
||||
opts = load_config(*config, overrides=overrides, accumulate_bad_lines=accumulate_bad_lines, profile=getattr(args, 'profile', ''))
|
||||
return opts
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user