diff --git a/modules/programs/kitty.nix b/modules/programs/kitty.nix index b39b58d0b..5ebdf05ea 100644 --- a/modules/programs/kitty.nix +++ b/modules/programs/kitty.nix @@ -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 kitty +kitten themes. + See + 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} diff --git a/tests/modules/programs/kitty/example-settings-expected.conf b/tests/modules/programs/kitty/example-settings-expected.conf index 0afd7a9a0..8d0fbd14a 100644 --- a/tests/modules/programs/kitty/example-settings-expected.conf +++ b/tests/modules/programs/kitty/example-settings-expected.conf @@ -5,6 +5,8 @@ font_family DejaVu Sans font_size 8 + + enable_audio_bell no scrollback_lines 10000 update_check_interval 0