Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

kitty

Stow package for ~/.config/kitty/. Kitty is the GPU-accelerated terminal — used here on macOS (/Applications/kitty.app, installed via the kitty.sh installer, not Homebrew).

Table of contents

Layout

FileStows to
kitty/.config/kitty/kitty.conf~/.config/kitty/kitty.conf
kitty/.config/kitty/dracula.conf~/.config/kitty/dracula.conf
kitty/.config/kitty/diff.conf~/.config/kitty/diff.conf
kitty/.config/kitty/ssh.conf~/.config/kitty/ssh.conf

Reload after editing: kitty @ load-config (needs allow_remote_control yes), or Cmd+Ctrl+, (macOS) / Ctrl+Shift+F5 (Linux).

Main config

kitty.conf pulls in the Dracula palette, sets the font, and tunes a handful of defaults. Sections:

FontJetBrainsMono Nerd Font Mono is the patched build with Nerd Font glyphs (install via the font-jetbrains-mono-nerd-font cask, or grab from nerdfonts.com).

Quality of life

SettingWhy
enable_audio_bell no / visual_bell_duration 0Silence the bell entirely
confirm_os_window_close 0Don’t prompt when closing a window with a running process
scrollback_lines 10000Bigger in-memory scrollback
scrollback_pager_history_size 100100 MB disk-backed scrollback for the pager kitten
repaint_delay 8 / input_delay 2 / sync_to_monitor yesSnappier rendering on Apple Silicon

macOS

SettingWhy
macos_option_as_alt leftLeft-Option behaves as Alt so ⌥←/⌥→ word-jump works in shells
macos_titlebar_color backgroundTitle bar adopts the bg color (no white strip)
macos_quit_when_last_window_closed yesQuitting the last window quits the app

Remote control + shell integration

SettingWhy
allow_remote_control yesUnlocks kitty @ ls, kitty @ set-tab-title, the ssh kitten, etc.
listen_on unix:/tmp/kitty-{kitty_pid}Per-process control socket
shell_integration enabledClick-to-move cursor, prompt marking, jump-by-prompt, etc.

Visual

SettingWhy
window_padding_width 6Subtle gutter between text and window edge
tab_bar_edge topTabs on top, away from prompt output
tab_bar_style powerline + tab_powerline_style slantedCurved powerline separators (uses JetBrainsMono Nerd Font glyphs)

Windows, tabs & layouts

kitty has its own multiplexing, independent of tmux. Terminology: an OS window holds tabs; each tab arranges windows (splits) using a layout. Every kitty shortcut uses cmd (macOS) or ctrl+shift (kitty_mod, e.g. on Linux) — a different namespace from the tmux C-a prefix, so the two never collide. Inside a tmux session, cmd+… drives kitty and C-a … drives tmux; they stack happily.

Keys below are macOS (the daily driver). On Linux cmd is inert and kitty’s ctrl+shift defaults apply — see the kitty docs.

Built-in defaults

ActionKey
New tab⌘T
Next / prev tab⌘] / ⌘[ (or ⌃Tab / ⇧⌃Tab)
Go to tab 1–10⌘1⌘9, ⌘0
Close tabctrl+shift+q
New OS window⌘N
Next / prev splitctrl+shift+] / ctrl+shift+[
Close split⌘W
Next layoutctrl+shift+l
Fullscreen toggle⌘↩

Custom maps (this config) — added to kitty.conf, macOS only. They repurpose the default ⌘D/⌘⇧D (new window) into iTerm-style directional splits:

KeyActionvim / tmux analog
⌘D / ⌘⇧Dsplit right / down (launch --location=vsplit/hsplit)tmux `prefix
⌘⌃H ⌘⌃J ⌘⌃K ⌘⌃Lfocus split left / down / up / rightvim ctrl-w hjkl, tmux prefix hjkl
⌘⌃⇧H ⌘⌃⇧J ⌘⌃⇧K ⌘⌃⇧Lmove / swap splitvim ctrl-w HJKL
⌘⌃Zzoom the active split (toggle stack)tmux prefix z
⌘Rresize mode → then arrows or hjkl, Enter/Esctmux prefix HJKL

(In kitty.conf the focus/move directions are left/right/top/bottom — kitty does not accept up/down.) These are safe alongside tmux because cmd never reaches the shell. The only chord that would clash — ctrl+a (the tmux prefix) — is deliberately never mapped in kitty.

Layoutsenabled_layouts splits,stack,tall,fat,grid, cycled with ctrl+shift+l:

  • splits — arbitrary horizontal/vertical splits; the default, and the only layout where the ⌘D/⌘⇧D direction applies.
  • stack — one split maximized (zoom); flip back with ctrl+shift+l.
  • tall / fat / grid — auto-tiled arrangements for quick even layouts.

In non-splits layouts, --location is ignored and a new window is just auto-placed by that layout.

ssh kitten

kitten ssh is kitty’s smarter ssh: it ships kitty’s terminfo and shell integration to the remote, so colors, prompt marking, and the clipboard work there even when kitty isn’t installed on the remote — and it can copy selected dotfiles over. It only works when your local terminal is kitty (allow_remote_control yes is already set above).

kitten ssh user@host          # older form: kitty +kitten ssh user@host
kssh user@host                # the alias in zsh/.zshrc (kitty-guarded)

kssh is preferred over aliasing ssh itself — it’s explicit, and ssh keeps working normally outside kitty (where kitten ssh can’t run anyway).

Per-host behavior lives in ssh.conf (tracked in this package, stowed to ~/.config/kitty/ssh.conf). It is not ~/.ssh/config — OpenSSH still owns hostnames, ports and keys; this only controls what kitten ssh carries over. The shipped starter enables remote shell integration and copies a few dependency-free configs (.vimrc, .editorconfig, .gitconfig), with a commented per-host block for heavier setups (nvim/zsh/tmux):

hostname *
shell_integration enabled
copy .vimrc
copy .editorconfig
copy .gitconfig
env EDITOR=vim

Caveat: wait for the shell prompt before typing on a fresh connection — early keystrokes during the bootstrap handshake can be dropped.

Dracula theme

dracula.conf is the upstream palette from https://draculatheme.com/kitty, unmodified. It sets:

  • Foreground/background and the full ANSI palette (color0color15)
  • Cursor, selection, URL underline
  • Tab bar foreground/background (active + inactive)
  • Split/window border colors
  • Mark colors (kitty’s scrollback marks feature)

Matches the rest of the dotfiles’ Dracula-ish palette ([[../tig/README.md]], [[../lazygit/README.md]]).

Diff colors

diff.conf styles kitty +kitten diff (kitty’s built-in side-by-side diff viewer) with the Dracula palette — green for added, red for removed, purple hunk separators, cyan search, yellow selection.

Invoke with kitty +kitten diff old new or alias it.

Fresh-machine setup

# kitty itself: NOT in Brewfile — installed standalone on macOS via
#   curl -L https://sw.kovidgoyal.net/kitty/installer.sh | sh /dev/stdin
# On Debian: apt install kitty (or use the same installer).

stow kitty