Add support for kitty's automatic theme switching based on OS color scheme. This creates the required auto theme config files: - light-theme.auto.conf - dark-theme.auto.conf - no-preference-theme.auto.conf Closes: nix-community/home-manager#6869
27 lines
737 B
Nix
27 lines
737 B
Nix
{ config, pkgs, ... }:
|
|
{
|
|
programs.kitty = {
|
|
enable = true;
|
|
autoThemeFiles = {
|
|
light = "GitHub";
|
|
dark = "TokyoNight";
|
|
noPreference = "OneDark";
|
|
};
|
|
};
|
|
|
|
test = {
|
|
assertFileExists = [
|
|
"home-files/.config/kitty/light-theme.auto.conf"
|
|
"home-files/.config/kitty/dark-theme.auto.conf"
|
|
"home-files/.config/kitty/no-preference-theme.auto.conf"
|
|
];
|
|
assertFileRegex = [
|
|
"home-files/.config/kitty/light-theme.auto.conf"
|
|
"^include .*themes/GitHub\\.conf$"
|
|
"home-files/.config/kitty/dark-theme.auto.conf"
|
|
"^include .*themes/TokyoNight\\.conf$"
|
|
"home-files/.config/kitty/no-preference-theme.auto.conf"
|
|
"^include .*themes/OneDark\\.conf$"
|
|
];
|
|
};
|
|
}
|