1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-30 06:59:45 +01:00

kitty: add option theme (#2710)

Add Kitty option to install kitty-themes and configure Kitty to use
one of those themes
This commit is contained in:
Nelson Alex Jeppesen 2022-02-08 10:54:24 -08:00 committed by GitHub
parent 1ca6293c8f
commit e2aa1f5986
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 21 additions and 0 deletions

View file

@ -72,6 +72,18 @@ in {
'';
};
theme = mkOption {
type = types.nullOr types.str;
default = null;
description = ''
Apply a Kitty color theme. This option takes the friendly name of
any theme given by the command <command>kitty +kitten themes</command>.
See <link xlink:href="https://github.com/kovidgoyal/kitty-themes"/>
for more details.
'';
example = "Space Gray Eighties";
};
font = mkOption {
type = types.nullOr hm.types.fontType;
default = null;
@ -130,6 +142,13 @@ in {
"font_size ${toString cfg.font.size}"}
''}
${optionalString (cfg.theme != null) ''
include ${pkgs.kitty-themes}/${
(head (filter (x: x.name == cfg.theme) (builtins.fromJSON
(builtins.readFile "${pkgs.kitty-themes}/themes.json")))).file
}
''}
${toKittyConfig cfg.settings}
${toKittyKeybindings cfg.keybindings}

View file

@ -5,6 +5,8 @@ font_family DejaVu Sans
font_size 8
enable_audio_bell no
scrollback_lines 10000
update_check_interval 0