How do I execute zellij upon creating a kitty terminal, without activating the zellij integration for my shell of choice?

Hello,

I used to have this with Alacritty, as it allowed users to specify a shell for the terminal, like this:

      terminal = {
        shell = {
          args = [
            "--login"
            "-c"
            "zellij"
          ];
          program = "${pkgs.zsh}/bin/zsh";
        };
      };

I don’t want zellij to autostart automatically everywhere; thus, I don’t want the integration with my shell of choice, but I want it to autostart for any kitty terminal.

How about using the $TERM variable?

programs.zsh.interactiveShellInit = ''
  if [ -z "$ZELLIJ" ]; then
      case "$TERM" in
          # Either generic for graphical terminals
          xterm-*)
          alacritry)
              # Probably get all the code from zellij setup in here,
              # or write a function and call it
              exec zellij
              ;;
          # Or do specific ones
          xterm-kitty)
              exec zellij
              ;;
      esac
  fi
'';

it is actually programs.zsh.initContent, but yes, your script will do the job. Thank you!