kitty: add onChange configuration reload

This commit is contained in:
Gabriel Fontes 2021-09-05 14:19:37 -03:00
parent 66d9dbfa36
commit ad05443e04
No known key found for this signature in database
GPG key ID: 2E54EA7BFE630916

View file

@ -110,24 +110,29 @@ in {
home.packages = [ pkgs.kitty ] ++ optionalPackage cfg.font;
xdg.configFile."kitty/kitty.conf".text = ''
# Generated by Home Manager.
# See https://sw.kovidgoyal.net/kitty/conf.html
xdg.configFile."kitty/kitty.conf" = {
onChange = ''
${pkgs.procps}/bin/pkill -USR1 -u $USER kitty || true
'';
text = ''
# Generated by Home Manager.
# See https://sw.kovidgoyal.net/kitty/conf.html
${optionalString (cfg.font != null) ''
font_family ${cfg.font.name}
${optionalString (cfg.font.size != null)
"font_size ${toString cfg.font.size}"}
''}
${optionalString (cfg.font != null) ''
font_family ${cfg.font.name}
${optionalString (cfg.font.size != null)
"font_size ${toString cfg.font.size}"}
''}
${toKittyConfig cfg.settings}
${toKittyConfig cfg.settings}
${toKittyKeybindings cfg.keybindings}
${toKittyKeybindings cfg.keybindings}
${toKittyEnv cfg.environment}
${toKittyEnv cfg.environment}
${cfg.extraConfig}
'';
${cfg.extraConfig}
'';
};
xdg.configFile."kitty/macos-launch-services-cmdline" =
mkIf (cfg.darwinLaunchOptions != null) {