1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-26 21:19:45 +01:00

kitty: produce fewer empty lines

This generates a more compact configuration file.
This commit is contained in:
Matthieu Coudron 2022-08-21 01:04:23 +02:00 committed by Robert Helgesson
parent 76fbb1b15e
commit 4c8c1c9977
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89
2 changed files with 10 additions and 20 deletions

View file

@ -133,28 +133,25 @@ in {
text = ''
# Generated by Home Manager.
# See https://sw.kovidgoyal.net/kitty/conf.html
'' + concatStringsSep "\n" ([
${optionalString (cfg.font != null) ''
(optionalString (cfg.font != null) ''
font_family ${cfg.font.name}
${optionalString (cfg.font.size != null)
"font_size ${toString cfg.font.size}"}
''}
'')
${optionalString (cfg.theme != null) ''
(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}
${toKittyEnv cfg.environment}
${cfg.extraConfig}
'';
'')
(toKittyConfig cfg.settings)
(toKittyKeybindings cfg.keybindings)
(toKittyEnv cfg.environment)
cfg.extraConfig
]);
} // optionalAttrs pkgs.stdenv.hostPlatform.isLinux {
onChange = ''
${pkgs.procps}/bin/pkill -USR1 -u $USER kitty || true

View file

@ -1,22 +1,15 @@
# Generated by Home Manager.
# See https://sw.kovidgoyal.net/kitty/conf.html
font_family DejaVu Sans
font_size 8
enable_audio_bell no
scrollback_lines 10000
update_check_interval 0
map ctrl+c copy_or_interrupt
map ctrl+f>2 set_font_size 20
env LS_COLORS=1