2022-11-20 22:07:02 +00:00
|
|
|
{ pkgs, ... }:
|
2022-01-23 01:32:58 +00:00
|
|
|
# Let-In --------------------------------------------------------------------------------------- {{{
|
|
|
|
let
|
2023-08-23 00:50:29 +00:00
|
|
|
colorsToKitty = colors:
|
|
|
|
with colors; {
|
|
|
|
inherit background foreground selection_background selection_foreground
|
|
|
|
tab_bar_background active_tab_background active_tab_foreground
|
|
|
|
inactive_tab_background inactive_tab_foreground;
|
|
|
|
cursor = white;
|
|
|
|
cursor_text_color = background;
|
|
|
|
color0 = black;
|
|
|
|
color8 = black;
|
|
|
|
color1 = red;
|
|
|
|
color9 = red;
|
|
|
|
color2 = green;
|
|
|
|
color10 = lime;
|
|
|
|
color3 = yellow;
|
|
|
|
color11 = orange;
|
|
|
|
color4 = blue;
|
|
|
|
color12 = blue;
|
|
|
|
color5 = magenta;
|
|
|
|
color13 = magenta;
|
|
|
|
color6 = cyan;
|
|
|
|
color14 = cyan;
|
|
|
|
color7 = white;
|
|
|
|
color15 = white;
|
|
|
|
url_color = brightgreen;
|
|
|
|
};
|
2023-02-01 04:31:51 +00:00
|
|
|
font = "Rec Mono Duotone";
|
2023-08-23 00:50:29 +00:00
|
|
|
# }}}
|
|
|
|
in {
|
2022-01-23 01:32:58 +00:00
|
|
|
# Kitty terminal
|
|
|
|
# https://sw.kovidgoyal.net/kitty/conf.html
|
|
|
|
# https://rycee.gitlab.io/home-manager/options.html#opt-programs.kitty.enable
|
|
|
|
programs.kitty.enable = true;
|
|
|
|
|
|
|
|
# General config ----------------------------------------------------------------------------- {{{
|
|
|
|
|
|
|
|
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";
|
2022-11-21 21:49:35 +00:00
|
|
|
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
|
|
|
|
|
|
|
|
# Window layout
|
|
|
|
hide_window_decorations = "titlebar-only";
|
|
|
|
window_padding_width = "10";
|
|
|
|
|
|
|
|
# Tab bar
|
|
|
|
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
|
|
|
|
|
|
|
# Shell integration manually enabled for fish
|
|
|
|
shell_integration = "disabled";
|
2022-07-29 22:01:24 +00:00
|
|
|
|
|
|
|
macos_option_as_alt = "both";
|
2022-01-23 01:32:58 +00:00
|
|
|
};
|
|
|
|
|
2022-12-18 04:08:37 +00:00
|
|
|
programs.kitty.extras.useSymbolsFromNerdFont = "CaskaydiaCove Nerd Font";
|
2022-01-23 01:32:58 +00:00
|
|
|
# }}}
|
|
|
|
|
|
|
|
# Colors config ------------------------------------------------------------------------------ {{{
|
2022-11-20 22:25:59 +00:00
|
|
|
programs.kitty.extras.colors = {
|
|
|
|
enable = true;
|
|
|
|
dark = colorsToKitty pkgs.lib.colors.tokyonight.dark;
|
|
|
|
light = colorsToKitty pkgs.lib.colors.tokyonight.light;
|
2022-11-21 21:49:35 +00:00
|
|
|
color-pkg = pkgs.kitty-themes;
|
|
|
|
dark-name = "themes/rose-pine";
|
|
|
|
light-name = "themes/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";
|
|
|
|
};
|
|
|
|
programs.fish.interactiveShellInit = ''
|
|
|
|
# Set term colors based on value of `$term_background` when shell starts up.
|
|
|
|
set-term-colors
|
|
|
|
# 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
|
|
|
|
'';
|
2022-07-04 22:00:05 +00:00
|
|
|
programs.fish.shellAliases = {
|
|
|
|
s = "kitty +kitten ssh";
|
|
|
|
e = "edit-in-kitty";
|
|
|
|
};
|
2022-01-23 01:32:58 +00:00
|
|
|
# }}}
|
2022-05-08 01:50:31 +00:00
|
|
|
|
|
|
|
# Fix icon config
|
|
|
|
programs.kitty.extras.fixIcon = {
|
|
|
|
enable = true;
|
2022-05-08 01:53:45 +00:00
|
|
|
appPath = "~/Applications/Home\\ Manager\\ Apps/kitty.app";
|
2022-07-30 02:15:19 +00:00
|
|
|
iconPath = "${pkgs.kitty-icon}/kitty-dark.icns";
|
2022-05-08 01:50:31 +00:00
|
|
|
};
|
2022-01-23 23:50:34 +00:00
|
|
|
}
|