blob: fdeb370657a737a8376d28be609a4830d42eb16c [file] [log] [blame]
{
config,
lib,
...
}: let
cfg = config.chimera.terminal.kitty;
in {
options.chimera.terminal.kitty = {
enable = lib.mkEnableOption "the kitty terminal emulator";
default = lib.mkOption {
type = lib.types.bool;
description = "Use kitty as your default terminal";
default = true;
};
};
config = lib.mkIf cfg.enable {
home.shellAliases = lib.mkIf (!config.chimera.terminal.ghostty.enable) {
# We can't have this set if anything except kitty is enabled, or ssh will break for non-kitty users
# TODO: can we make a function to dynamically choose?
ssh = "${config.programs.kitty.package}/bin/kitten ssh";
};
chimera.terminal.default = lib.mkIf cfg.default "${config.programs.kitty.package}/bin/kitty";
programs.kitty = {
enable = true;
themeFile =
if config.chimera.theme.catppuccin.enable then
"Catppuccin-${config.chimera.theme.catppuccin.style}"
else
null;
font = config.chimera.theme.font.mono;
shellIntegration = {
enableZshIntegration = config.chimera.shell.zsh.enable;
enableBashIntegration = config.chimera.shell.bash.enable;
};
settings = {
confirm_os_window_close = -1;
symbol_map = lib.mkIf config.chimera.theme.font.nerdFontGlyphs.enable "U+23FB-U+23FE,U+2665,U+26A1,U+2B58,U+E000-U+E00A,U+E0A0-U+E0A3,U+E0B0-U+E0D4,U+E200-U+E2A9,U+E300-U+E3E3,U+E5FA-U+E6AA,U+E700-U+E7C5,U+EA60-U+EBEB,U+F000-U+F2E0,U+F300-U+F32F,U+F400-U+F4A9,U+F500-U+F8FF,U+F0001-U+F1AF0 Symbols Nerd Font Mono";
};
};
};
}