dotfiles.nix/home/kitty.nix

64 lines
1.9 KiB
Nix

{ pkgs, lib, ... }:
let font = "Rec Mono Duotone";
in {
imports = [ ./extras/kitty/auto-theme.nix ./extras/kitty/nerd-font.nix ];
programs.kitty.enable = true;
# using kitty from homebrew
programs.kitty.package = pkgs.emptyDirectory;
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;
dark-name = "rose-pine";
light-name = "rose-pine-dawn";
};
programs.fish.functions.set-term-colors = {
body = ''
if test "$term_background" = light
term-light
else
term-dark
end
'';
onVariable = "term_background";
};
}