mirror of
https://github.com/nix-community/home-manager
synced 2024-12-02 16:09:46 +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:
parent
1ca6293c8f
commit
e2aa1f5986
2 changed files with 21 additions and 0 deletions
|
@ -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 {
|
font = mkOption {
|
||||||
type = types.nullOr hm.types.fontType;
|
type = types.nullOr hm.types.fontType;
|
||||||
default = null;
|
default = null;
|
||||||
|
@ -130,6 +142,13 @@ in {
|
||||||
"font_size ${toString cfg.font.size}"}
|
"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}
|
${toKittyConfig cfg.settings}
|
||||||
|
|
||||||
${toKittyKeybindings cfg.keybindings}
|
${toKittyKeybindings cfg.keybindings}
|
||||||
|
|
|
@ -5,6 +5,8 @@ font_family DejaVu Sans
|
||||||
font_size 8
|
font_size 8
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
enable_audio_bell no
|
enable_audio_bell no
|
||||||
scrollback_lines 10000
|
scrollback_lines 10000
|
||||||
update_check_interval 0
|
update_check_interval 0
|
||||||
|
|
Loading…
Reference in a new issue