dotfiles.nix/home/kitty.nix

64 lines
1.9 KiB
Nix
Raw Normal View History

2023-10-26 02:37:42 +00:00
{ pkgs, lib, ... }:
let font = "Rec Mono Duotone";
2023-08-23 00:50:29 +00:00
in {
imports = [ ./extras/kitty/auto-theme.nix ./extras/kitty/nerd-font.nix ];
2022-01-23 01:32:58 +00:00
programs.kitty.enable = true;
# using kitty from homebrew
programs.kitty.package = pkgs.emptyDirectory;
2022-01-23 01:32:58 +00:00
programs.kitty.settings = {
2022-11-20 15:38:04 +00:00
font_family = font;
2022-12-18 04:08:37 +00:00
bold_font = "${font} Bold";
italic_font = "${font} Italic";
bold_italic_font = "${font} Bold Italic";
font_size = "15.0";
2022-01-23 01:32:58 +00:00
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";
2022-11-21 22:08:24 +00:00
tab_powerline_style = "angled";
tab_title_template = "{index}: {title}";
2022-01-23 01:32:58 +00:00
active_tab_font_style = "bold";
inactive_tab_font_style = "normal";
2022-02-12 23:30:53 +00:00
tab_activity_symbol = "💬";
2022-01-23 01:32:58 +00:00
2023-10-26 02:37:42 +00:00
# shell integration is manually enabled for fish
2022-01-23 01:32:58 +00:00
shell_integration = "disabled";
2023-10-26 02:37:42 +00:00
} // lib.optionalAttrs pkgs.stdenv.isDarwin { macos_option_as_alt = "both"; };
2022-07-29 22:01:24 +00:00
2023-10-26 02:37:42 +00:00
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";
2022-01-23 01:32:58 +00:00
};
2023-10-26 02:37:42 +00:00
programs.kitty.useSymbolsFromNerdFont = "CaskaydiaCove Nerd Font";
programs.kitty.colors = {
2022-11-20 22:25:59 +00:00
enable = true;
dark-name = "rose-pine";
light-name = "rose-pine-dawn";
2022-11-20 22:25:59 +00:00
};
2022-01-23 01:32:58 +00:00
programs.fish.functions.set-term-colors = {
2022-07-26 04:22:16 +00:00
body = ''
if test "$term_background" = light
term-light
else
term-dark
end
'';
2022-01-23 01:32:58 +00:00
onVariable = "term_background";
};
}