nix/modules/home-manager/kitty.nix

178 lines
5.1 KiB
Nix
Raw Permalink Normal View History

2023-10-05 13:43:28 -05:00
{
colors,
font,
...
}: {
programs.kitty = {
enable = true;
darwinLaunchOptions = ["--single-instance"];
shellIntegration = {
enableFishIntegration = true;
};
settings = with colors.withHashPrefix; {
2024-01-04 22:15:55 -06:00
font_family = font.name;
bold_font = "${font.name} Heavy";
italic_font = "${font.name} Italic";
bold_italic_font = "${font.name} Heavy Italic";
font_size = toString font.size;
inactive_text_alpha = "0.5";
copy_on_select = true;
hide_window_decorations = "yes";
2023-10-05 13:43:28 -05:00
2024-01-04 22:15:55 -06:00
scrollback_lines = 500000;
2023-10-05 13:43:28 -05:00
2024-01-04 22:15:55 -06:00
symbol_map = "U+23FB-U+23FE,U+2665,U+26A1,U+2B58,U+E000-U+E00A,U+E0A0-U+E0A3,U+E0B0-U+E0D4,U+E200-U+E2A9,U+E300-U+E3E3,U+E5FA-U+E6AA,U+E700-U+E7C5,U+EA60-U+EBEB,U+F000-U+F2E0,U+F300-U+F32F,U+F400-U+F4A9,U+F500-U+F8FF,U+F0001-U+F1AF0 Symbols Nerd Font Mono";
2023-10-05 13:43:28 -05:00
# use `kitty + list-fonts --psnames` to get the font's PostScript name
2024-01-04 22:15:55 -06:00
allow_remote_control = true;
listen_on = "unix:/tmp/kitty";
repaint_delay = 3;
input_delay = 3;
sync_to_monitor = true;
2023-10-05 13:43:28 -05:00
2024-01-04 22:15:55 -06:00
adjust_line_height = 0;
window_padding_width = "10.0";
window_margin_width = "0.0";
2023-10-05 13:43:28 -05:00
2024-01-04 22:15:55 -06:00
confirm_os_window_close = 0;
2023-10-05 13:43:28 -05:00
2024-01-04 22:15:55 -06:00
enabled_layouts = "splits:split_axis=vertical,stack";
2023-10-05 13:43:28 -05:00
2024-01-04 22:15:55 -06:00
shell_integration = "disabled";
2023-10-05 13:43:28 -05:00
2024-01-04 22:15:55 -06:00
enable_audio_bell = true;
visual_bell_duration = "0.25";
visual_bell_color = bg3;
2023-10-05 13:43:28 -05:00
2024-01-04 22:15:55 -06:00
url_style = "single";
2023-10-05 13:43:28 -05:00
2024-01-04 22:15:55 -06:00
strip_trailing_spaces = "smart";
2023-10-05 13:43:28 -05:00
# open_url_modifiers ctrl
2024-01-04 22:15:55 -06:00
tab_bar_align = "left";
tab_bar_style = "separator";
tab_separator = ''""'';
2024-03-25 09:44:55 -05:00
tab_bar_edge = "bottom";
2024-01-04 22:15:55 -06:00
tab_title_template = ''"{fmt.fg.tab}{fmt.bg.tab} {activity_symbol}{title} "'';
active_tab_font_style = "normal";
2023-10-05 13:43:28 -05:00
## name: Catppuccin Kitty Mocha
## author: Catppuccin Org
## license: MIT
## upstream: https://github.com/catppuccin/kitty/blob/main/mocha.conf
## blurb: Soothing pastel theme for the high-spirited!
# The basic colors
2024-01-04 22:15:55 -06:00
foreground = text;
background = bg;
selection_foreground = bg;
selection_background = text;
2023-10-05 13:43:28 -05:00
# Cursor colors
2024-01-04 22:15:55 -06:00
cursor = text;
cursor_text_color = bg;
2023-10-05 13:43:28 -05:00
# URL underline color when hovering with mouse
2024-01-04 22:15:55 -06:00
url_color = primary;
2023-10-05 13:43:28 -05:00
# Kitty window border colors
2024-01-04 22:15:55 -06:00
active_border_color = primary;
inactive_border_color = bg3;
bell_border_color = urgent;
2023-10-05 13:43:28 -05:00
# OS Window titlebar colors
2024-01-04 22:15:55 -06:00
wayland_titlebar_color = "system";
macos_titlebar_color = "system";
2023-10-05 13:43:28 -05:00
# Tab bar colors
2024-01-04 22:15:55 -06:00
active_tab_foreground = bg;
active_tab_background = primary;
inactive_tab_foreground = fgdim;
inactive_tab_background = bg2;
tab_bar_background = bg;
2023-10-05 13:43:28 -05:00
# Colors for marks (marked text in the terminal)
2024-01-04 22:15:55 -06:00
mark1_foreground = bg;
mark1_background = blue;
mark2_foreground = bg;
mark2_background = purple;
mark3_foreground = bg;
mark3_background = blue;
2023-10-05 13:43:28 -05:00
# The 16 terminal colors
# black
2024-01-04 22:15:55 -06:00
color0 = colors.withHashPrefix."0";
color8 = colors.withHashPrefix."8";
2023-10-05 13:43:28 -05:00
# red
2024-01-04 22:15:55 -06:00
color1 = colors.withHashPrefix."1";
color9 = colors.withHashPrefix."9";
2023-10-05 13:43:28 -05:00
# green
2024-01-04 22:15:55 -06:00
color2 = colors.withHashPrefix."2";
color10 = colors.withHashPrefix."10";
2023-10-05 13:43:28 -05:00
# yellow
2024-01-04 22:15:55 -06:00
color3 = colors.withHashPrefix."3";
color11 = colors.withHashPrefix."11";
2023-10-05 13:43:28 -05:00
# blue
2024-01-04 22:15:55 -06:00
color4 = colors.withHashPrefix."4";
color12 = colors.withHashPrefix."12";
2023-10-05 13:43:28 -05:00
# magenta
2024-01-04 22:15:55 -06:00
color5 = colors.withHashPrefix."5";
color13 = colors.withHashPrefix."13";
2023-10-05 13:43:28 -05:00
# cyan
2024-01-04 22:15:55 -06:00
color6 = colors.withHashPrefix."6";
color14 = colors.withHashPrefix."14";
2023-10-05 13:43:28 -05:00
# white
2024-01-04 22:15:55 -06:00
color7 = colors.withHashPrefix."7";
color15 = colors.withHashPrefix."15";
2023-10-05 13:43:28 -05:00
};
keybindings = {
"ctrl+shift+1" = "change_font_size all 12.5";
"ctrl+shift+2" = "change_font_size all 18.5";
"ctrl+shift+3" = "change_font_size all 26";
"ctrl+shift+4" = "change_font_size all 32";
"ctrl+shift+5" = "change_font_size all 48";
"ctrl+shift+o" = "launch --type=tab --stdin-source=@screen_scrollback $EDITOR";
"ctrl+shift+equal" = "change_font_size all +0.5";
"ctrl+shift+minus" = "change_font_size all -0.5";
"shift+insert" = "paste_from_clipboard";
"ctrl+shift+v" = "paste_from_selection";
"ctrl+shift+c" = "copy_to_clipboard";
# kill pane
"ctrl+shift+q" = "close_window";
# kill tab
"ctrl+alt+shift+q" = "close_tab";
2023-11-09 16:25:30 -06:00
"ctrl+shift+j" = "launch --location=hsplit --cwd=current";
"ctrl+shift+l" = "launch --location=vsplit --cwd=current";
2023-10-05 13:43:28 -05:00
"ctrl+alt+shift+k" = "move_window up";
"ctrl+alt+shift+h" = "move_window left";
"ctrl+alt+shift+l" = "move_window right";
"ctrl+alt+shift+j" = "move_window down";
"ctrl+h" = "neighboring_window left";
"ctrl+l" = "neighboring_window right";
"ctrl+k" = "neighboring_window up";
"ctrl+j" = "neighboring_window down";
"ctrl+shift+h" = "nth_window -1";
2023-10-05 13:43:28 -05:00
"ctrl+shift+space>u" = "kitten hints --type=url --program @";
"ctrl+shift+z" = "toggle_layout stack";
};
};
}