From 8345a3166dd482f98e37b502e30dc56a16da4853 Mon Sep 17 00:00:00 2001 From: Robert Helgesson Date: Fri, 12 May 2023 23:19:59 +0200 Subject: [PATCH] kitty: minor fixes --- modules/programs/kitty.nix | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/modules/programs/kitty.nix b/modules/programs/kitty.nix index 7cf255890..d9a3081d6 100644 --- a/modules/programs/kitty.nix +++ b/modules/programs/kitty.nix @@ -142,20 +142,23 @@ in { mode = mkOption { type = types.str; default = "enabled"; + example = "no-cursor"; description = '' Set the mode of the shell integration. This accepts the same options - as the shell_integration option of Kitty. Note that no-rc is always - implied. See + as the shell_integration option of Kitty. Note that + no-rc is always implied. See for more details. ''; - example = "no-cursor"; }; - enableBashIntegration = mkEnableOption "Kitty bash integration" + + enableBashIntegration = mkEnableOption "Kitty Bash integration" // shellIntegrationDefaultOpt; + enableFishIntegration = mkEnableOption "Kitty fish integration" // shellIntegrationDefaultOpt; - enableZshIntegration = mkEnableOption "Kitty zsh integration" + + enableZshIntegration = mkEnableOption "Kitty Z Shell integration" // shellIntegrationDefaultOpt; }; @@ -207,10 +210,13 @@ in { (cfg.darwinLaunchOptions != null && pkgs.stdenv.hostPlatform.isDarwin) { text = concatStringsSep " " cfg.darwinLaunchOptions; }; + programs.bash.initExtra = mkIf cfg.shellIntegration.enableBashIntegration shellIntegrationInit.bash; + programs.fish.interactiveShellInit = mkIf cfg.shellIntegration.enableFishIntegration shellIntegrationInit.fish; + programs.zsh.initExtra = mkIf cfg.shellIntegration.enableZshIntegration shellIntegrationInit.zsh; };