Skip to content

Latest commit

 

History

History
291 lines (240 loc) · 7.93 KB

File metadata and controls

291 lines (240 loc) · 7.93 KB

kitty config

Last revised and exported on {{{last-exported-at}}} with a word count of {{{word-count}}}.

For a long time, I left my kitty.conf largely unmodified, save for font and colour scheme. I figured that, since I spend a lot of time either actively in a terminal, or rely on output generated from one, I’d look into what kitty has on offer.

Of all these options, the one that truly showed me why reading man-pages pays dividends is notify_on_cmd_finish (c.f. Notifications for long-running processes).

1 Font settings

Using Prot’s Aporetic fonts in Emacs, I thought I’d give them a try in the terminal as well. So far, they look nice, but readability for the tiny information-chunks that terminals often contain could be better.

I’m going to run with this for a while (<2026-02-15 Sun>) and see how it performs.

font_family family="Aporetic Serif Mono"
bold_font family="Aporetic Sans Mono Bold"
italic_font auto
bold_italic_font auto
font_size 12.5
disable_ligatures cursor
undercurl_style thin-sparse
text_composition_strategy 0.7 50
text_fg_override_threshold 4.5 ratio

2 Theme

2.1 Cursor

cursor none

2.2 Solarized

For some reason, I prefer lighter colour scheme over the omnipresent dark mode. Especially in lighter environments, it’s much more pleasing to work with than having to squint at light text on dark background.

I can’t really remember where I got these colour definitions from; I didn’t tune them myself, that’s for sure.

background            #fdf6e3
foreground            #52676f
cursor                #52676f
selection_background  #e9e2cb
color0                #e4e4e4
color8                #ffffd7
color1                #d70000
color9                #d75f00
color2                #5f8700
color10               #585858
color3                #af8700
color11               #626262
color4                #0087ff
color12               #808080
color5                #af005f
color13               #5f5faf
color6                #00afaf
color14               #8a8a8a
color7                #262626
color15               #1c1c1c
selection_foreground  #fcf4dc
include ~/.config/kitty/solarized.conf
map f6 set_colors --configured ~/.config/kitty/modus-vivendi-tinted.conf

3 Scrollback

scrollback_page_history_size is set to 50 MB, roughly 500 000 lines at 100 chars per line pure ASCII.
scrollback_lines 4000
scrollback_pager_history_size 50

4 Mouse behaviour

I don’t want the mouse cursor to hide, because it always results in tickling the touchpad to activate it again and orient.

I also want focus to follow the mouse, as that is what i3 does anyway, and the times I have assumed this to be the case and found myself typing Ctrl-C in the wrong place are uncountable.

mouse_hide_wait -1
url_style dotted
clear_selection_on_clipboard_loss yes
strip_trailing_spaces smart
focus_follows_mouse yes

5 Performance tuning

repaint_delay 20
input_delay 1
sync_to_monitor no

6 Terminal Bell

enable_audio_bell no
visual_bell_duration 3.0 ease-in linear

7 Windows

Setting the text in the inactive window to slightly transparent is really all it takes to separate content meaningfully. I still like the border for now, but that will probably be made even less obtrusive.

window_border_width 1px
window_margin_width 0
window_padding_width 0
inactive_text_alpha 0.8
hide_window_decorations titlebar-and-corners

8 Window management

Create a new window splitting the space used by the existing one so that the two windows are placed one above the other.

map ctrl+x>2 launch --location=hsplit --cwd=current

Create a new window splitting the space used by the existing one so that the two windows are placed side by side.

map ctrl+x>3 launch --location=vsplit --cwd=current

Create a new window splitting the space used by the existing one so that the two windows are placed side by side if the existing window is wide or one above the other if the existing window is tall.

map ctrl+x>4 launch --location=split --cwd=current

Rotate the current split, changing its split axis from vertical to horizontal or vice versa.

map ctrl+x>5 layout_action rotate

Move the active window in the indicated direction.

map shift+up move_window up
map shift+left move_window left
map shift+right move_window right
map shift+down move_window down

Move the active window to the indicated screen edge.

map ctrl+shift+up layout_action move_to_screen_edge top
map ctrl+shift+left layout_action move_to_screen_edge left
map ctrl+shift+right layout_action move_to_screen_edge right
map ctrl+shift+down layout_action move_to_screen_edge bottom

Switch focus to the neighboring window in the indicated direction.

map ctrl+left neighboring_window left
map ctrl+right neighboring_window right
map ctrl+up neighboring_window up
map ctrl+down neighboring_window down

Set the bias of the split containing the currently focused window. The currently focused window will take up the specified percent of its parent window’s size.

map ctrl+. layout_action bias 80

9 Key bindings

map ctrl+shift+f5 load_config_file

9.1 Scrolling

I’m leaving these here, because I didn’t know about them and likely will forget they exist.

map ctrl+shift+z scroll_to_prompt -1
map ctrl+shift+x scroll_to_prompt 1
map ctrl+shift+h show_scrollback
map f1 launch --stdin-source=@screen_scrollback --stdin-add-formatting --type=overlay less +G -RAW-CONTROL-CHARS

10 Advanced config

update_check_interval 0

10.1 Notifications for long-running processes

This is a feature I didn’t even know kitty had! I was thinking about wiring up something myself, in order to avoid the constant polling of long-running commands. Setting this to unfocused will now alert me whenever I’m not consciously watching the termin, perhaps because I’m in a 50:50 split, hacking away at something, and waiting for a compilation to finish.

notify_on_cmd_finish unfocused 10 notify focus