In this article, we will discuss what is Kitty Terminal Emulator, explore the features of Kitty Terminal Emulator, and show you how to install and use Kitty Terminal Emulator on your Linux system.
Table of Contents
What is Kitty Terminal Emulator?
Kitty Terminal Emulator is a powerful, customizable, and fast terminal emulator for Linux. It is an open-source terminal emulator that supports GPU-accelerated rendering and offers advanced features like auto-scrolling, remote access, and many more.
Kitty terminal is fast since the system load is rendered in the GPU. Kitty also uses threaded rendering to maintain minimal latency.
The default terminal emulator that comes with your operating system typically only supports new windows and tabs, but not horizontal and vertical splits. For better session management, we have to rely on tools like Tmux or GNU Screen.
However, Kitty supports tabs, splits, and multiple layouts to manage windows, and they are programmable, meaning you can preconfigure them to be launched in the way you want.
Kitty also comes with "kittens", which is a framework to extend the functionality of the terminal. You can create your standalone programs in Python and add them to the terminal, and these programs will be called kittens.
Kitty Terminal Emulator is designed for power users who need a feature-rich terminal emulator. With its advanced features and sleek interface, Kitty Terminal Emulator is quickly becoming a popular choice for developers, system administrators, and Linux enthusiasts who demand a high-performance and customizable terminal emulator.
Kitty Terminal is an opensource program written in Python and supports Linux, macOS and BSD.
Kitty Terminal Features
Kitty Terminal is a feature-rich terminal emulator that boasts a wide range of capabilities. Some of its notable features include:
- Cross-platform - Available for Linux, macOS, and BSDs.
- GPU and threaded rendering for better performance.
- Text-based configuration.
- Support for windows, tabs, and splits.
- Customizable key bindings.
- Customizable color schemes and themes.
- OS Specific tweaks.
- Extend kitty functionality using kittens.
- Custom startup sessions.
- Integration with shells.
- Multiple copy & paste buffer.
Install Kitty Terminal Emulator in Linux
There are several ways to install Kitty. In this guide, I will walk you through installing Kitty Terminal Emulator from your operating system's repository and using the installation script.
1. Install Kitty Terminal using Installation Script
To install Kitty using the installation script, run the following command. This will download the script and install Kitty. The binaries will be installed under ~/.local/kitty.app
. Please ensure that the .local
directory is included in your $PATH
variable.
$ curl -L https://sw.kovidgoyal.net/kitty/installer.sh | sh /dev/stdin
2. Install Kitty Terminal using Package Manager
Kitty terminal is available in the default repositories of many Linux operating systems.
To install Kitty Terminal in Alpine linux, run the following command.
$ sudo apk add kitty
On Arch Linux and its variants such as EndeavourOS and Manjaro Linuxand, run the following command.
$ sudo pacman -S kitty
On Debian, Ubuntu and its derivatives such as Linux Mint, Pop!_OS, run the following command.
$ sudo apt install kitty -y
On Fedora, RHEL, CentOS, AlmaLinux, Rocky Linux:
$ sudo dnf install kitty -y
For FreeBSD, run the following command.
$ pkg install kitty
Kitty Configuration File
Kitty uses a configuration file stored under "~/.config/kitty/kitty.conf
". After installing Kitty, the configuration file must be generated as it is not created by default.
To generate the config file, press CTRL + SHIFT + F2
within the Kitty terminal. This will open the configuration file with all settings commented out. You can then uncomment and modify the required parameters and save the file.
To make the configuration changes effective, you can either close and reopen the terminal or use the keyboard shortcut "CTRL + SHIFT + F5
" to reload the configurations within the terminal.
As mentioned earlier, Kitty looks for the configuration file under the ".config/kitty
" directory, but you can also store the configuration file in a different location and use it while launching the terminal.
$ kitty --config <path-to-config-file>
Alternatively, you can also set the following environmental variable.
KITTY_CONFIG_DIRECTORY
For demonstration purposes, I am going to create the config file manually and build it from scratch.
$ touch ~/.config/kitty/kitty.conf
Kitty Terminal - Font Settings
Kitty supports extensive font management but at the most basic level, you can set what fonts to be used for regular, bold, and italics along with font size.
You can get the list of installed fonts from your system or run the following command which will show the list of available fonts to be used by kitty.
$ kitty +list-fonts
Here, I am going to use "Ubuntu Mono" as my font.
At the end of the kitty.conf
file, add the following properties and press "CTRL + SHIFT + F5
" to reload the configuration.
# Font Configurations # font_family Ubuntu Mono bold_font Ubuntu Mono Bold italic_font Ubuntu Mono Italic bold_italic_font Ubuntu Mono Bold Italic font_size 13
Cursor Settings
You can set the cursor shape by adding the following property to the config file. The supported values are block, beam, and underline. Here I am setting the shape to underline.
cursor_shape underline
You can set the cursor blink interval by adjusting the following properties.
cursor_blink_interval
=> Sets the cursor to blink in given seconds. Setting it to zero will disable the cursor blink.cursor_stop_blinking_after
=> Sets the cursor to stop blinking after a given second. Setting it to zero will allow the cursor to blink without stopping.
cursor_blink_interval 0
cursor_stop_blinking_after 0
You can set the cursor color by setting the following property.
cursor #f1c232
This is how cursor color looks by default.
This is how cursor color looks after changing its color. I have changed its color to Yellow.
Scrollback Settings
Scrollback allows you to scroll a number of lines in the terminal. Add the following property and modify the value according to your need.
scrollback_lines 200000
Setting a negative number will allow you to do infinite scrollback.
Default Shell
Kitty uses the default shell configured for the user profile. You can set different shells by adding the following properties in the config file. Here I am setting the shell as "fish".
shell /bin/fish
Default EDITOR
Kitty uses the default text editor setup in the VISUAL
and EDITOR
environmental variable. If the default text editor is not set, kitty will cycle through the list of installed editors and pick the first editor.
If you wish to set the editor of your choice, add the following property in the conf file. Here I am setting sublime text as the preferred choice. You can set any editor as per your wish.
editor /usr/bin/subl
Tabs
To create a new tab in Kitty, press the "CTRL + SHIFT + T
" key. To navigate between different tabs, you can either press "CTRL + SHIFT + ARROWS
" or "CTRL + SHIFT + TAB
".
You can rename the title of the tab by pressing "CTRL + SHIFT + ALT + T
".
As you see in the following screenshot, I've renamed the tab's title.
You can set the tab bar position to "top" or "bottom" by adding the following property. By default, it is set to the bottom as you can see in the previous images.
You can change the tab bar style. You have 5 options to choose from.
- fade
- slant
- separator
- powerline
- hidden
By default, it is set to "fade". Add the following property to set the tab bar style:
tab_bar_style powerline
Setting Kitty Theme
There are two ways to set up themes in kitty.
- Download a particular theme and add it to the configuration file.
- Store the theme in a separate file and include it in the main conf file.
There are a lot of themes available for use in the github repository. I am choosing the ayu theme. Add the data to the kitty.conf
file.
You can also clone the entire repository and use the "include
" directive in the kitty.conf
file.
$ git clone --depth 1 https://github.com/dexpota/kitty-themes.git ~/.config/kitty/kitty-themes
Add the following line to the kitty.conf
file. Here I am setting the Ubuntu theme.
# syntax include ./kitty-themes/themes/<themename>.conf # ubuntu theme include ./kitty-themes/themes/Ubuntu.conf
Window Settings in Kitty Terminal
When you launch Kitty for the first time, it will have a default window height and width. You can set the following property which will always launch the terminal windows with custom size.
initial_window_width 640
initial_window_height 400
The above values are in pixels and if you wish to add them as cells instead of pixels suffix the value with the letter "c
".
initial_window_width 130c
initial_window_height 30c
Kitty can remember the window size opened last time and reopen it when you launch the new window. Set the following property in the config file.
remember_window_size yes
When you set the windows size manually set the above property to false.
Different Window Layouts
Kitty supports different layouts to arrange windows.
- The stack Layout.
- The Tall Layout.
- The Fat Layout.
- The Grid Layout.
- The Splits Layout.
- The Horizontal Layout.
- The Vertical Layout.
By default all the windows are enabled and available to be used. Particularly I am interested in horizontal and vertical layouts.
You can control which layouts alone are to be used by adding the following property in the kitty.conf
file.
enabled_layouts horizontal
Press the "CTRL + SHIFT + ENTER
" key to create the layout. Since the enabled layouts are restricted to "horizontal", only horizontal layouts will be created.
To set the layout to vertical add the following property in the kitty.conf
file.
enabled_layouts vertical
To enable both the horizontal and vertical layout add the following property.
enabled_layouts vertical,horizontal
Now when you create a new layout, it will pick the first configuration which in this case is set to "vertical" and only use it. You can press "CTRL + SHIFT + L
" to cycle through both vertical as well as horizontal splits.
Extend Kitty Functionality With Kittens
As mentioned earlier, kitten is a framework where you can create your own standalone program and use it in the terminal. Kitty comes with a set of default kittens.
Each kitten performs different functions. For example, if I wish to see an image in the terminal, I can use the icat kitten.
$ kitty +kitten icat <path-to-image>
Take a look at other kittens and see which one fits your use case.
Customize Keybindings
Kitty comes with default keybindings for different actions. You can also add the custom keybindings in the kitty.conf
file. First, you have to choose for which action you wish to remap the keys. You can get the mappable actions list from this link.
The syntax for keybinding is as follows.
map <keystroke> action <value>
For example, I wish to set a keybinding for new tab creation from "CTRL + SHIFT + T
" to "CTRL + SHIFT + N
" and set tab tile from "CTRL + SHIFT + ALT + R
" to "CTRL + SHIFT + ,
".
map ctrl+shift+n new_tab
map ctrl+shift+, set_tab_title
Go through the list of actions and determine which ones require custom bindings based on your preferences.
Conclusion
Kitty is an exceptional terminal emulator in the Linux space, specially designed for power users. With its GPU-accelerated rendering capabilities, Kitty outperforms other standard terminals, making it an ideal choice for users looking for enhanced performance and speed.
In conclusion, Kitty Terminal Emulator is a highly functional and customizable terminal emulator for Linux, BSDs, and macOS. Overall, Kitty Terminal Emulator is a great alternative to the default terminal emulators and offers a smooth and efficient experience for developers and Linux enthusiasts.
Have you tried Kitty? We would love to hear your thoughts about this terminal via the comment section below.
Resources:
Related Read: