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:
BlackAngelTV committed 2026-11-07 15:53:05 +01:00
1 parent 154e91b906
commit 1cfe7217f9
9 files changed
+303 -9

No files matched your search

+7
View File
@@ -416,6 +416,13 @@ completion=type:file ext:conf group:"Config files" kwds:none,NONE
{config_help}
--profile
Apply the named configuration profile on top of the loaded configuration.
Profiles are declared in :file:`kitty.conf` with
:code:`profile <name> {{ ... }}` blocks. This overrides the
:envvar:`KITTY_PROFILE` environment variable.
--override -o
type=list
completion=type:special group:complete_kitty_override