nix-config/users/common/programs/kitty.nix

65 lines
1.8 KiB
Nix
Raw Normal View History

2023-09-22 20:57:08 +02:00
{
pkgs,
lib,
...
}: {
stylix.targets.kitty.enable = true;
2023-01-21 17:30:50 +01:00
programs.kitty = {
enable = true;
2023-09-20 14:39:39 +02:00
package = pkgs.kitty.overrideAttrs (_finalAttrs: _prevAttrs: {
2023-01-21 17:30:50 +01:00
doCheck = false;
});
settings = {
# Use xterm-256color because copying terminfo-kitty is painful.
term = "xterm-256color";
2024-03-19 00:46:35 +01:00
# make kitty go brrrr
repaint_delay = 8;
input_delay = 0;
sync_to_monitor = "no";
2023-01-21 17:30:50 +01:00
# Do not wait for inherited child processes.
close_on_child_death = "yes";
# Disable ligatures.
2023-11-22 10:14:23 +01:00
disable_ligatures = "cursor";
2023-01-21 17:30:50 +01:00
# Modified onehalfdark color scheme
cursor = "#cccccc";
shell_integration = "disabled";
2023-01-21 17:30:50 +01:00
selection_foreground = "#282c34";
selection_background = "#979eab";
# Disable cursor blinking
cursor_blink_interval = "0";
# Big fat scrollback buffer
scrollback_lines = "100000";
# Set scrollback buffer for pager in MB
scrollback_pager_history_size = "256";
# Don't copy on select
copy_on_select = "no";
# Set program to open urls with
open_url_with = "xdg-open";
# Fuck the bell
enable_audio_bell = "no";
};
keybindings = {
# Keyboard mappings
"shift+page_up" = "scroll_page_up";
"shift+page_down" = "scroll_page_down";
"ctrl+shift+." = "change_font_size all -2.0";
2023-01-22 20:43:10 +01:00
"ctrl+shift+," = "change_font_size all +2.0";
2023-01-21 17:30:50 +01:00
};
2023-09-27 13:16:36 +02:00
extraConfig = lib.mkAfter ''
2024-04-11 23:11:53 +02:00
# Use nvim as scrollback pager
scrollback_pager nvim -u NONE -c "set nonumber nolist showtabline=0 foldcolumn=0 laststatus=0" -c "autocmd TermOpen * normal G" -c "silent write! /tmp/kitty_scrollback_buffer | te head -c-1 /tmp/kitty_scrollback_buffer; rm /tmp/kitty_scrollback_buffer; cat"
2023-09-27 13:16:36 +02:00
background #000000
2023-01-21 17:30:50 +01:00
'';
};
}