nixos-config/home/kitty.nix

70 lines
2.3 KiB
Nix
Raw Normal View History

2025-01-22 03:08:18 -05:00
{ pkgs, ... }:
{
2025-01-21 16:24:33 -05:00
programs.kitty = {
enable = true;
font = {
name = "IBM Plex Mono";
package = pkgs.ibm-plex;
size = 12;
};
themeFile = "GitHub_Dark";
settings = {
enable_audio_bell = true;
2025-01-21 16:24:33 -05:00
# how many windows should be open before kitty asks
# for confirmation
confirm_os_window_close = 0;
2025-01-21 21:59:59 -05:00
clear_all_shortcuts = true;
2025-01-21 23:25:52 -05:00
# will probably lower this later but the max allowed is actually 4GB
2025-01-22 03:08:18 -05:00
# this is NOT stored in memory and can only be viewed with scrollback_pager
2025-01-21 23:25:52 -05:00
"scrollback_pager_history_size" = "1024";
# see https://github.com/sharkdp/bat/issues/1077#issuecomment-652785399
"scrollback_pager" = "bat --pager='less -FR +G'";
"scrollback_lines" = 20000;
2025-01-21 16:24:33 -05:00
};
keybindings = {
# kitty_mod is ctrl+shift by default
"kitty_mod+c" = "copy_to_clipboard";
"kitty_mod+v" = "paste_from_clipboard";
2025-01-21 21:59:59 -05:00
# "ctrl+q" = "quit";
2025-01-21 16:24:33 -05:00
2025-01-21 23:25:52 -05:00
"kitty_mod+m" = "show_scrollback";
2025-01-21 16:24:33 -05:00
# windows
"kitty_mod+h" = "neighboring_window left";
"kitty_mod+alt+h" = "move_window left";
"kitty_mod+l" = "neighboring_window right";
"kitty_mod+alt+l" = "move_window right";
"kitty_mod+j" = "neighboring_window down";
"kitty_mod+alt+j" = "move_window down";
"kitty_mod+k" = "neighboring_window up";
"kitty_mod+alt+k" = "move_window up";
"ctrl+f3" = "detach_window new-tab";
2025-01-21 21:59:59 -05:00
"ctrl+f4" = "detach_window tab-left";
"ctrl+f5" = "load_config_file";
2025-01-21 16:24:33 -05:00
"ctrl+alt+l" = "next_layout";
"ctrl+alt+t" = "goto_layout tall";
"ctrl+alt+s" = "goto_layout stack";
2025-01-21 21:59:59 -05:00
"kitty_mod+enter" = "new_window_with_cwd";
"kitty_mod+r" = "resize_window";
2025-01-21 16:24:33 -05:00
# tabs
"kitty_mod+n" = "next_tab";
"kitty_mod+p" = "previous_tab";
"kitty_mod+alt+n" = "move_tab_forward";
"kitty_mod+alt+p" = "move_tab_backward";
"kitty_mod+w" = "close_tab";
2025-01-21 21:59:59 -05:00
"kitty_mod+t" = "new_tab_with_cwd";
"ctrl+f2" = "detach_tab";
# hints
"kitty_mod+o>o" = "open_url_with_hints";
"kitty_mod+o>p" = "kitten hints --type path --program -";
"kitty_mod+o>n" = "kitten hints --type line --program -";
"kitty_mod+o>w" = "kitten hints --type word --program -";
"kitty_mod+o>h" = "kitten hints --type hash --program -";
"kitty_mod+o>l" = "kitten hints --type linenum";
2025-01-21 16:24:33 -05:00
};
};
}