kitty

From ArchWiki
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

kitty is a scriptable OpenGL based terminal emulator with TrueColor, ligatures support, protocol extensions for keyboard input and image rendering. It also offers tiling capabilities, like GNU Screen or tmux.

kitty is relatively new, of which first release (v0.1.0) was in Feb 2017. It however does not mean it is still premature.

Installation

Install the kitty package.

Usage

New tabs and windows can be created and resized through various Ctrl+Shift shortcuts. Layouts are switchable through Ctrl+Shift+l and can be saved/restored.

A full keyboard mode provides distinction between ambiguous keys like Ctrl+i vs Tab. Moreover, new text effects like curly-underline are also available for applications that support it.

Kittens

kitty has a framework for creating subprograms called kittens. Some of them:

$ kitty +kitten icat image.jpeg             # show image in the terminal (needs imagemagick)
$ kitty +kitten diff file1 file2            # show diff of two files
$ kitty +kitten clipboard                   # this kitten allows working with clipboard even over ssh

Configuration

Note: If you are editing the default configuration with vim the sections will begin folded. Each section can be expanded by using zo in normal mode.

kitty stores its configuration in ~/.config/kitty/kitty.conf and the default configuration can be found at /usr/share/doc/kitty/kitty.conf. Fonts, colors, cursors and scrollback behaviors can be adjusted. You can see all available options in the official documentation.

Tips and Tricks

Enable IME support

Kitty support for IBus IME framework is disabled by default. To enable it, set the environment variable GLFW_IM_MODULE=ibus. This will also work with Fcitx5 due to the compatible IBus interface that it offers.

Troubleshooting

Terminal issues with SSH

When kitty is used to ssh into a remote that does not have its terminfo, various issues can occur. The solution is normally to copy over the terminfo. Kitty has an ssh kitten to automate exactly this.

$ kitty +kitten ssh user@host

You may want to set it as an alias for ssh.

If for whatever reason you are unable to install the terminfo on the remote, you can try setting TERM to something that is more likely to be present. Note that this might disable some of the terminal's features. See OpenSSH#Connecting to a remote without the appropriate terminfo entry.

See also