You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would appreciate it if there was a way to disable setting shell_integration = no-rc in kitty. This is because I don't have home-manager managing my shell config, and so I want to use kitty's built-in shell integration method, but if no-rc is always enabled this is impossible. It's possible to work around this by setting settings.shell_integration since that makes it appear twice in the config, and it seems like the latter entry overrides the former, but this feels janky.
The solution I've come up with is that manually setting shellIntegration.mode = ""; should make that not show up at all in the config. I believe this (untested) patch should make it behave as such. I can do some testing and submit this as a PR if desired.
diff --git a/modules/programs/kitty.nix b/modules/programs/kitty.nix
index 48ec13da..ffc66c5b 100644
--- a/modules/programs/kitty.nix+++ b/modules/programs/kitty.nix@@ -144,20 +144,20 @@ in {
shellIntegration = {
mode = mkOption {
type = types.str;
default = "no-rc";
example = "no-cursor";
apply = (o:
- let+ optionalString o (let
modes = splitString " " o;
filtered = filter (m: m != "no-rc") modes;
- in concatStringsSep " " (concatLists [ [ "no-rc" ] filtered ]));+ in concatStringsSep " " (concatLists [ [ "no-rc" ] filtered ])));
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+ `no-rc` is always implied if nonempty. See
<https://sw.kovidgoyal.net/kitty/shell-integration>
for more details.
'';
};
enableBashIntegration = mkEnableOption "Kitty Bash integration"
@@ -200,16 +200,16 @@ in {
"${pkgs.kitty-themes}/share/kitty-themes/themes.json"));
in throwIf (length matching == 0)
"kitty-themes does not contain a theme named ${cfg.theme}"
(head matching).file
}
'')
- ''+ (optionalString cfg.shellIntegration.mode ''
# Shell integration is sourced and configured manually
shell_integration ${cfg.shellIntegration.mode}
- ''+ '')
(toKittyConfig cfg.settings)
(toKittyKeybindings cfg.keybindings)
(toKittyEnv cfg.environment)
cfg.extraConfig
]);
} // optionalAttrs pkgs.stdenv.hostPlatform.isLinux {
The text was updated successfully, but these errors were encountered:
Description
I would appreciate it if there was a way to disable setting
shell_integration = no-rc
in kitty. This is because I don't have home-manager managing my shell config, and so I want to use kitty's built-in shell integration method, but ifno-rc
is always enabled this is impossible. It's possible to work around this by settingsettings.shell_integration
since that makes it appear twice in the config, and it seems like the latter entry overrides the former, but this feels janky.The solution I've come up with is that manually setting
shellIntegration.mode = "";
should make that not show up at all in the config. I believe this (untested) patch should make it behave as such. I can do some testing and submit this as a PR if desired.The text was updated successfully, but these errors were encountered: