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-23 10:24:21 +07:00
|
|
|
programs.zsh.initExtra = /*bash*/ ''
|
2024-07-22 17:56:33 +07:00
|
|
|
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;
|
2024-07-23 10:24:21 +07:00
|
|
|
cursor_blink_interval = toString 0.5;
|
2024-07-22 17:56:33 +07:00
|
|
|
};
|
|
|
|
keybindings = {
|
2024-07-23 10:24:21 +07:00
|
|
|
"ctrl+a>enter" = "launch --location=vsplit --cwd=current";
|
|
|
|
"ctrl+a>backspace" = "launch --location=hsplit --cwd=current";
|
2024-07-22 17:56:33 +07:00
|
|
|
"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";
|
2024-07-23 10:24:21 +07:00
|
|
|
"ctrl+a>r" = "start_resizing_window";
|
2024-07-22 17:56:33 +07:00
|
|
|
};
|
|
|
|
font = {
|
|
|
|
name = "JetBrainsMono Nerd Font Mono";
|
|
|
|
size = 11;
|
|
|
|
};
|
|
|
|
extraConfig = ''
|
|
|
|
globinclude kitty.d/**/*.conf
|
|
|
|
'';
|
|
|
|
};
|
2024-06-12 09:54:11 +07:00
|
|
|
};
|
|
|
|
}
|