NixOS/home/config/kitty/default.nix

54 lines
1.3 KiB
Nix
Raw Normal View History

2024-06-12 18:09:56 +07:00
{ config, lib, ... }:
let
cfg = config.profile.kitty;
in
2024-06-12 09:54:11 +07:00
{
2024-06-12 18:09:56 +07:00
config = lib.mkIf cfg.enable {
2024-07-22 17:56:33 +07:00
programs.zsh.initExtra = ''
if [[ "$TERM" == "xterm-kitty" ]]; then
alias ssh="kitty +kitten ssh"
fi
'';
programs.kitty = {
enable = true;
settings = {
# General
underline_hyperlinks = "always";
enable_audio_bell = false;
# Layouts
enabled_layouts = "splits";
# Window
tab_bar_edge = "top";
tab_bar_margin_width = toString 0.2;
tab_bar_style = "slant";
background_blur = 40;
background_opacity = toString 0.90;
};
keybindings = {
"ctrl+a>enter" = "launch --location=hsplit --cwd=current";
"ctrl+a>backspace" = "launch --location=vsplit --cwd=current";
"ctrl+a>h" = "neighboring_window left";
"ctrl+a>j" = "neighboring_window down";
"ctrl+a>k" = "neighboring_window up";
"ctrl+a>l" = "neighboring_window right";
"ctrl+a>t" = "new_tab_with_cwd";
"ctrl+a>w" = "close_window";
};
font = {
name = "JetBrainsMono Nerd Font Mono";
size = 11;
};
extraConfig = ''
globinclude kitty.d/**/*.conf
'';
};
2024-06-12 09:54:11 +07:00
2024-06-12 18:09:56 +07:00
home.file.".config/kitty" = {
source = ./.;
recursive = true;
};
2024-06-12 09:54:11 +07:00
};
}