{ pkgs, lib, ... }: let font = "Rec Mono Duotone"; in { programs.kitty.enable = true; programs.kitty.settings = { font_family = font; bold_font = "${font} Bold"; italic_font = "${font} Italic"; bold_italic_font = "${font} Bold Italic"; font_size = "15.0"; adjust_line_height = "120%"; disable_ligatures = "cursor"; # disable ligatures when cursor is on them hide_window_decorations = "titlebar-only"; window_padding_width = "10"; tab_bar_edge = "top"; tab_bar_style = "powerline"; tab_powerline_style = "angled"; tab_title_template = "{index}: {title}"; active_tab_font_style = "bold"; inactive_tab_font_style = "normal"; tab_activity_symbol = "💬"; # shell integration is manually enabled for fish shell_integration = "disabled"; } // lib.optionalAttrs pkgs.stdenv.isDarwin { macos_option_as_alt = "both"; }; programs.fish.interactiveShellInit = '' # Manually enable shell integration if set -q KITTY_INSTALLATION_DIR set --global KITTY_SHELL_INTEGRATION enabled source "$KITTY_INSTALLATION_DIR/shell-integration/fish/vendor_conf.d/kitty-shell-integration.fish" set --prepend fish_complete_path "$KITTY_INSTALLATION_DIR/shell-integration/fish/vendor_completions.d" end set-term-colors ''; programs.fish.shellAliases = { s = "kitty +kitten ssh"; e = "edit-in-kitty"; }; programs.kitty.useSymbolsFromNerdFont = "CaskaydiaCove Nerd Font"; programs.kitty.colors = { enable = true; color-pkg = pkgs.kitty-themes; dark-name = "themes/rose-pine"; light-name = "themes/rose-pine-dawn"; }; programs.fish.functions.set-term-colors = { body = '' if test "$term_background" = light term-light else term-dark end ''; onVariable = "term_background"; }; programs.kitty.fixIcon = lib.mkIf pkgs.stdenv.isDarwin { enable = true; # TODO: use path to kitty package? appPath = "~/Applications/Home\\ Manager\\ Apps/kitty.app"; iconPath = "${pkgs.kitty-icon}/kitty-dark.icns"; }; }