Kitty

From Gentoo Wiki
Jump to:navigation Jump to:search

Kitty is a low-latency, full-featured, modern, terminal emulator, written in C and Python, that offloads rendering to the GPU. Kitty is designed for speed, functionality, and extensibility, aiming to include useful functionality while still remaining fast and light.

By default, a little performance is traded-off against usability, though this can be adjusted.

Installation

USE flags

USE flags for x11-terms/kitty Fast, feature-rich, GPU-based terminal

+X Add support for X11
test Enable dependencies and/or preparations necessary to run tests (usually controlled by FEATURES=test but can be toggled independently)
verify-sig Verify upstream signatures on distfiles
wayland Enable dev-libs/wayland backend

Emerge

root #emerge --ask x11-terms/kitty

Configuration

Files

kitty does not automatically create or install a configuration file, but it will search for one in the following locations:

  • $XDG_CONFIG_HOME/.config/kitty/kitty.conf
  • $KITTY_CONFIG_DIRECTORY/kitty.conf
  • $HOME/.config/kitty/kitty.conf

Configuration files with currently supported values are provided with each upstream release. On Gentoo, depending on the version installed, the file can be found in the following location. Be sure to adjust the PV ( package version) value to align with whatever version is currently installed on the system.

The default configuration can be created in a users' home directory with the following commands:

user $mkdir --parents ~/.config/kitty
user $bzcat /usr/share/doc/kitty-${PV}/kitty.conf.bz2 > ~/.config/kitty/kitty.conf

Live reload

Kitty doesn't support live reload of the configuration.

Font configuration

One can run the following command and copy the desired font name:

user $fc-list -f '%{family}\n' | awk '!x[$0]++'

Changing the default font by editing the config file.

FILE ~/.config/kitty/kitty.conffont configure
# Font configuration (changes require restart)
font_family      hack
bold_font        auto
italic_font      auto
bold_italic_font auto
font_size 11.0

This will change the font to one provided by media-fonts/hack, given that the package is installed.

Colors configuration

FILE ~/.config/kitty/kitty.confcolor schemes
# Special
foreground #...
background #...

# Black
color0 #...
color8 #...

# Red
color1 #...
color9 #...

# Green
color2  #...
color10 #...

# Yellow
color3  #...
color11 #...

# Blue
color4  #...
color12 #...

# Magenta
color5  #...
color13 #...

# Cyan
color6  #...
color14 #...

# White
color7  #...
color15 #...

# Cursor
cursor #...
cursor_text_color #...

Transparent background

FILE ~/.config/kitty/kitty.conftransparent background configure
# value range is 0 ~ 1
background_opacity 0.9

Tabs

Kitty does support tabs, here are keybinds how to use them:

New tab: ctrl+shift+t

Close tab: ctrl+shift+q

Next tab: ctrl+shift+right

Previous tab: ctrl+shift+left

Next layout: ctrl+shift+l

Move tab forward: ctrl+shift+.

Move tab backward: ctrl+shift+,

Set tab title: ctrl+shift+alt+t

Usage

Invocation

Kitty will generally be launched from an on screen menu or keyboard shortcut in a user's graphical environment.

Kitty may be launched from a shell under X11 or Wayland.

user $kitty --help

Troubleshooting

fcitx5 pinyin not working

According to the The Developer, kitty is neither GTK nor QT, so try this environment variable under X11 or Wayland:

CODE
GLFW_IM_MODULE=ibus