Kitty is a cross-platform GPU-based terminal emulator. It is feature-rich, written in Python and Objective C. It can easily be controlled from shell prompt, over ssh and through scripts. It is a light-weight emulator, build for low resource usage but to give higher experience on images and videos. It supports images, Unicode, mouse protocol, true-color, hyperlinks among others.

In this guide, we are going to be looking at how to install and customize Kitty terminal emulator on Linux.

Install Kitty terminal emulator on Linux | macOS using Package managers

Installation can be done using package managers as shown below.

# Ubuntu / Debian
sudo apt-get update
sudo apt-get install kitty

# Arch Linux / Manjaro
$ sudo pacman -S kitty

# Fedora
$ sudo dnf -y install kitty

# macOS
$ brew install kitty

To open, just type ‘kitty’ on your terminal.

$ kitty

You should also notice ‘kitty’ has been added to your desktop applications and you can launch it from there.

Install Kitty terminal emulator on Linux | macOS using installer script

On MacOS and Linux, you can install kitty from pre-built binaries. Simply run the below command:

curl -L https://sw.kovidgoyal.net/kitty/installer.sh | sh /dev/stdin

The above command installs the binary in  ~/.local/kitty.app/bin/ on Linux and /Applications/kitty.app/bin directory on MacOS. Now launch it by the below command

~/.local/kitty.app/bin/kitty

Consider adding the binary location in your PATH.

$ vim ~/.bashrc
export PATH=$PATH:~/.local/kitty.app/bin

# For Zsh
$ vim ~/.zshrc
export PATH=$PATH:~/.local/kitty.app/bin

It should open a terminal as below:

Install Kitty Terminal Emulator on Linux | macOS from source

You can also install kitty from source. You need to ensure that you have the following dependencies installed:

  • python 3.5 and later versions
  • harfbuzz 1.5.0 and later versions
  • zlib
  • libpng
  • liblcms2
  • gcc
  • freetype (macOS)
  • fontconfig (macOS)
  • libcanberra (macOS)
  • ImageMagick (optional, for  kitty icat tool to display images in the terminal)
  • pygments (optional, for syntax highlighting in kitty +kitten diff)

Once you have the dependencies installed, clone kitty repository from Github as below:

git clone https://github.com/kovidgoyal/kitty

Change to the directory of the downloaded content and install kitty

cd kitty
make

You can then launch as below:

./kitty/launcher/kitty

Once installed, you are now ready to start using kitty terminal emulator. Having launched, you can run different programs on different windows using ctrl+shift+enter.

kitty

Important Kitty Terminal Emulator Shortcuts

The following are some of the useful shortcuts to be used with Kitty:

Scroll page upctrl+shift+page_up
Scroll page downctrl+shift+page_down
New tab ctrl+shift+t
New window   ctrl+shift+enter
New OS windowctrl+shift+n

Working with ‘tab’

Next tabctrl+shift+right (also ^+⇥ and ⇧+⌘+] on macOS)
Previous tabctrl+shift+left (also ⇧+^+⇥ and ⇧+⌘+[ on macOS)
Next layoutctrl+shift+l
Move tab forwardctrl+shift+.
Move tab backwardctrl+shift+,
Set tab titlectrl+shift+alt+t

And for windows;

Move window forwardctrl+shift+f
Move window backwardctrl+shift+b
Move window to topctrl+shift+`
Focus specific windowctrl+shift+1ctrl+shift+2 … ctrl+shift+0 (also ⌘+1⌘+2 … ⌘+9 on macOS) (clockwise from the top-left)

How To Customize Kitty Terminal Emulator

Kitty terminal emulator can be customized using a configuration file. Kitty is highly customizable. Here, you can change fonts size and family, background and foreground colors and even define shortcuts to ease your use among others. Launch kitty and create a configuration file as below.

sudo vim /.config/kitty/kitty.conf

Add the following content to change font, background and foreground colors.

# font_family      Input Mono 
font_family      Fantasque Sans Mono 
italic_font      auto 
bold_font        auto 
bold_italic_font auto 

# Font size (in pts) 
font_size        18.0 

# The amount the font size is changed by (in pts) when increasing/decreasing 
# the font size in a running terminal. 
font_size_delta 2 

# The foreground color 
foreground       #c0b18b 

# The background color 
background       #202020

Save the file, exit the terminal and launch back in. You should notice the difference as below:

Kitty Completion Configurations for Bash, Zsh and Fish

For popular shells; bash, zsh and fish, kitty comes with the completion for the kitty command.

# bash - Add the following to your ~/.bashrc 
source <(kitty + complete setup bash) 

#Older versions of bash (for example, v3.2) do not support process substitution with the source #command, in which #case you can try an alternative: 
source /dev/stdin <<<"$(kitty + complete setup bash)" 

# zsh - 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. 

#fish 
#For versions of fish earlier than 3.0.0, add the following to your ~/.config/fish/config.fish. Later versions source completions by default. 

kitty + complete setup fish | source

You have successfully installed and configured Kitty Terminal Emulator on Linux. Kitty is lightweight and highly customizable GPU based terminal emulator. Enjoy using Kitty. More interesting guides below:

LEAVE A REPLY

Please enter your comment!
Please enter your name here