kitty - the fast, featureful, GPU based terminal emulator — kitty 0.12.0 documentation


  • Offloads rendering to the GPU for lower system load and buttery smooth scrolling. Uses threaded rendering to minimize input latency.
  • Supports all modern terminal features: graphics (images), unicode, true-color, OpenType ligatures, mouse protocol, focus tracking, bracketed paste and several new terminal protocol extensions.
  • Supports tiling multiple terminal windows side by side in different layouts without needing to use an extra program like tmux
  • Can be controlled from scripts or the shell prompt, even over SSH.
  • Has a framework for Kittens, small terminal programs that can be used to extend kitty's functionality. For example, they are used for Unicode input, Hints and Side-by-side diff.
  • Supports startup sessions which allow you to specify the window/tab layout, working directories and programs to run on startup.
  • Cross-platform: kitty works on Linux and macOS, but because it uses only OpenGL for rendering, it should be trivial to port to other Unix-like platforms.
  • Allows you to open the scrollback buffer in a separate window using arbitrary programs of your choice. This is useful for browsing the history comfortably in a pager or editor.

Screenshot, showing three programs in the 'Tall' layout

Screenshot, showing vim, tig and git running in kitty with the 'Tall' layout

kitty is designed for power keyboard users. To that end all its controls work with the keyboard (although it fully supports mouse interactions as well). Its configuration is a simple, human editable, single file for easy reproducibility (I like to store configuration in source control).

The code in kitty is designed to be simple, modular and hackable. It is written in a mix of C (for performance sensitive parts) and Python (for easy hackability of the UI). It does not depend on any large and complex UI toolkit, using only OpenGL for rendering everything.

Finally, kitty is designed from the ground up to support all modern terminal features, such as unicode, true color, bold/italic fonts, text formatting, etc. It even extends existing text formatting escape codes, to add support for features not available elsewhere, such as colored and styled (curly) underlines. One of the design goals of kitty is to be easily extensible so that new features can be added in the future with relatively less effort.

Currently, there are five layouts available,

  • Stack -- Only a single maximized window is shown at a time
  • Tall -- One window is shown full height on the left, the rest of the windows are shown one below the other on the right
  • Fat -- One window is shown full width on the top, the rest of the windows are shown side-by-side on the bottom
  • Grid -- All windows are shown in a grid
  • Horizontal -- All windows are shown side-by-side
  • Vertical -- All windows are shown one below the other

You can switch between layouts using the ctrl+shift+l key combination. You can also create shortcuts to select particular layouts, and choose which layouts you want to enable/disable, see Layout management for examples.

You can resize windows inside layouts. Press ctrl+shift+r to enter resizing mode and follow the on-screen instructions. In a given window layout only some operations may be possible for a particular window. For example, in the Tall layout you can make the first window wider/narrower, but not taller/shorter. Note that what you are resizing is actually not a window, but a row/column in the layout, all windows in that row/column will be resized.

Some layouts take options to control their behavior. For example, the fat and tall layouts accept the bias option to control how the available space is split up. To specify the option, in kitty.conf use:

enabled_layouts tall:bias=70

This will make the tall window occupy 70% of available width. bias can be any number between 10 and 90.

Writing a new layout only requires about a hundred lines of code, so if there is some layout you want, take a look at layout.py and submit a pull request!

kitty has a framework for easily creating terminal programs that make use of its advanced features. These programs are called kittens. They are used both to add features to kitty itself and to create useful standalone programs. Some prominent kittens:

icat
Display images in the terminal
diff
A fast, side-by-side diff for the terminal with syntax highlighting and images
Unicode Input
Easily input arbitrary unicode characters in kitty by name or hex code.
Hints
Select and open/paste/insert arbitrary text snippets such as URLs, filenames, words, lines, etc from the terminal screen.
Panel
Draw a GPU accelerated dock panel on your desktop showing the output from an arbitrary terminal program.
Clipboard
Copy/paste to the clipboard from shell scripts, even over SSH.

kitty is highly configurable, everything from keyboard shortcuts to painting frames-per-second. For details and a sample kitty.conf, see the configuration docs.

kitty has a very powerful system that allows you to control it from the shell prompt, even over SSH. You can change colors, fonts, open new windows, tabs, set their titles, change window layout, get text from one window and send text to another, etc, etc. The possibilities are endless. See the tutorial to get started.

You can control the tabs, window layout, working directory, startup programs, etc. by creating a "session" file and using the kitty --session command line flag or the startup_session option in kitty.conf. For example:

# Set the window layout for the current tab
layout tall
# Set the working directory for windows in the current tab
cd ~
# Create a window and run the specified command in it
launch zsh
# Create a window with some environment variables set and run
# vim in it
launch env FOO=BAR vim
# Set the title for the next window
title Chat with x
launch irssi --profile x # Create a new tab (the part after new_tab is the optional tab
# name which will be displayed in the tab bar, if omitted, the
# title of the active window will be used instead)
new_tab my tab
cd ~/somewhere
# Set the layouts allowed in this tab
enabled_layouts tall, stack
# Set the current layout
layout stack
launch zsh
# Make the current window the active (focused) window
focus
launch emacs

Mouse features

  • You can also hold down ctrl+shift and click on a URL to open it in a browser.
  • You can double click to select a word and triple click to select a line.
  • You can right click to extend a previous selection
  • You can hold down ctrl+alt and drag with the mouse to select in columns

kitty has extremely flexible and powerful font selection features. You can specify individual families for the regular, bold, italic and bold+italic fonts. You can even specify specific font families for specific ranges of unicode characters. This allows precise control over text rendering. It can come in handy for applications like powerline, without the need to use patched fonts. See the various font related configuration directives in Fonts.

The list of Frequently Asked Questions (FAQ) is available here.

kitty comes with completion for the kitty command for popular shells.

Add the following to your ~/.bashrc

source <(kitty + complete setup bash)

Add the following to your ~/.zshrc

autoload -Uz compinit
compinit
# Completion for kitty
kitty + complete setup zsh | source /dev/stdin

The important thing above is to make sure the call to kitty to load the zsh completions happens after the call to compinit.