From 73401750a0423d286399ff5bb8cf9b79af362836 Mon Sep 17 00:00:00 2001 From: OlivierChiasson Date: Sun, 7 Jun 2026 16:38:21 -0300 Subject: [PATCH] Refactor terminal configurations to streamline shell execution - Updated Hyprland&Niri keybinds to remove explicit shell invocation for kitty --- modules/desktop/hyprland/default.nix | 2 +- modules/desktop/niri/default.nix | 2 +- modules/wisdom/terminals/kitty.nix | 10 +++++++++- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/modules/desktop/hyprland/default.nix b/modules/desktop/hyprland/default.nix index a9caab6..874bfa2 100644 --- a/modules/desktop/hyprland/default.nix +++ b/modules/desktop/hyprland/default.nix @@ -99,7 +99,7 @@ # Default keybinds bind = [ - "SUPER,T,exec,kitty -e fish" + "SUPER,T,exec,kitty" "ControlSuper,T,exec,konsole" "SUPER,D,exec,rofi -show drun" "ControlSuper,D,exec,rofi -show window" diff --git a/modules/desktop/niri/default.nix b/modules/desktop/niri/default.nix index 8fe55d3..4b3a494 100644 --- a/modules/desktop/niri/default.nix +++ b/modules/desktop/niri/default.nix @@ -29,7 +29,7 @@ let ]; #TODO[epic=Binds] Go over binds again binds = { - "Mod+T"."spawn-sh" = "${pkgs.lib.getExe pkgs.kitty} -e fish"; #TODO[epic=Binds] This should only be set if having kitty + "Mod+T"."spawn-sh" = pkgs.lib.getExe pkgs.kitty; # shell from kitty HM config "Mod+Control+T"."spawn-sh" = "konsole"; #TODO[epic=Binds] This should only be set if having konsole "Mod+D"."spawn-sh" = "rofi -show drun"; #TODO[epic=Binds] This should only be set if having rofi "Mod+Space"."spawn-sh" = "dms ipc call spotlight toggle"; #TODO[epic=Binds] This should only be set if having dms diff --git a/modules/wisdom/terminals/kitty.nix b/modules/wisdom/terminals/kitty.nix index f32ea65..47d3023 100644 --- a/modules/wisdom/terminals/kitty.nix +++ b/modules/wisdom/terminals/kitty.nix @@ -1,9 +1,16 @@ { ... }: { flake.homeManagerModules.wisdomTerminalsKitty = - { config, lib, ... }: + { config, lib, pkgs, ... }: let root = config.chiasson.home; cfg = config.chiasson.home.terminals.kitty; + kittyShellExe = + if config.programs.fish.enable or false then + lib.getExe config.programs.fish.package + else if config.programs.bash.enable or false then + lib.getExe config.programs.bash.package + else + "${pkgs.bash}/bin/bash"; in { options.chiasson.home.terminals.kitty.enable = lib.mkEnableOption '' @@ -14,6 +21,7 @@ programs.kitty = { enable = true; extraConfig = '' + shell ${kittyShellExe} include dank-tabs.conf include dank-theme.conf allow_remote_control yes