dotfiles.nix/home/kitty.nix

88 lines
2.7 KiB
Nix
Raw Normal View History

2022-01-23 01:32:58 +00:00
{ config, lib, pkgs, ... }:
# Let-In --------------------------------------------------------------------------------------- {{{
let
inherit (lib) mkIf;
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 = {
# # https://fsd.it/shop/fonts/pragmatapro/
# font_family = "PragmataPro Mono Liga";
font_family = "FiraCode Nerd Font";
font_size = "14.0";
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-02-12 23:30:53 +00:00
tab_powerline_style = "slanted";
2022-01-23 01:32:58 +00:00
tab_title_template = "Tab {index}: {title}";
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";
};
# Change the style of italic font variants
# programs.kitty.extraConfig = ''
# font_features PragmataProMonoLiga-Italic +ss06
# font_features PragmataProMonoLiga-BoldItalic +ss07
# '';
programs.kitty.extras.useSymbolsFromNerdFont = "FiraCode Nerd Font";
# }}}
# Colors config ------------------------------------------------------------------------------ {{{
programs.kitty.extras.colors =
let
2022-07-04 22:00:05 +00:00
theme = pkgs.lib.colors.tokyonight;
in
{
enable = true;
2022-02-12 07:20:19 +00:00
common = theme.common;
dark = theme.dark;
light = theme.light;
2022-01-23 01:32:58 +00:00
};
programs.fish.functions.set-term-colors = {
body = "term-background $term_background";
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-05-08 01:50:31 +00:00
iconPath = "~/Development/kitty-icon/kitty-dark.icns";
};
}