Skip to content

Kitty terminalλ︎

Kitty Logo Kitty Logo

Kitty Terminal is a fast, feature-rich, GPU based terminal emulator providing additional features via+kitten extensions.

Practicalli uses Kitty as the terminal application on Linux and MacOS operating systems. Kitty is used for running Neovim and all command line tools.

Installλ︎

Install Kitty via the Debian package manager.

sudo apt install kitty

Install the kitty homebrew package

brew install --cask kitty

Download kitty from GitHub releases or use one of the package managers for your operating system.

Use the installer script to install in ~/.local/kitty.app on Linux and /Applications/kitty.app on macOS.

Install script for Linux & MacOSX

curl -L https://sw.kovidgoyal.net/kitty/installer.sh | sh /dev/stdin \
 dest=~/.local/apps/kitty/kitty-<version>

Add kitty and kitten to the operating system path by creating symbolic links

Install script for Linux & MacOSX

ln -sf ~/.local/apps/kitty/kitty-<version>/bin/kitty \
~/.local/apps/kitty/kitty-<version>/bin/kitten \
~/.local/bin/

Include kitty in desktop launchers using the kitty.desktop file

Symbolic link for Kitty desktop application

ln -s ~/.local/apps/kitty/kitty-<version>/share/applications/kitty.desktop \
~/.local/share/applications/kitty.desktop

Open text files and images in kitty via the file manager

Symbolic link for Kitty file manager support

ln -s ~/.local/apps/kitty/kitty-<version>/share/applications/kitty-open.desktop \
~/.local/share/applications/kitty-open.desktop

Configurationλ︎

Copy the installed configuration to make personal changes, or start a new configuration file in ~/.config/kitty/kitty.conf

Practicalli Kitty configuration is included in the Practicalli Dotfiles repository. Clone the repository

Clone Practicalli Dotfiles

git clone git@github.com:practicalli/dotfiles.git
Create a symbolic link to the kitty configuration from the $HOME/.config directory
ln -s ~/projects/practicalli/dotfiles/kitty  ~/.config/kitty

Practicalli Kitty configuration
~/.config/kitty/kitty.conf
# ---------------------------------------------------------
# Practicalli Kitty terminal theme
#
# Configuration using GitHub theme with light and dark options
# using FiraCode font and NerdFont symbol mappings for icon support
# for powerline10k and web-devicons in Neovim
# ---------------------------------------------------------


# ---------------------------------------------------------
# Colorscheme / Icons

# `kitty +kitten themes` to browse available themes and apply one
# `kitty +kitten themes theme-name` to change theme directly
# Favorite themes include:
# kitty +kitten themes Gruvbox Material Dark Hard
# kitty +kitten themes Gruvbox Material Light Hard
# Shell Aliases: kitty-dark & kitty-light

# BEGIN_KITTY_THEME
# Gruvbox Material Dark Hard
include current-theme.conf
# END_KITTY_THEME

# ---------------------------------------------------------

# ---------------------------------------------------------
# Key bindings

# Open new tab in current window
map ctrl+shift+t launch --cwd=current --type=tab

# ---------------------------------------------------------


# ---------------------------------------------------------
# Terminal app visuals
# - OS specific include: linux, macosx, bsd

include ${KITTY_OS}.conf


# ---------------------------------------------------------
# Tab styles
# fade slant separator powerline custom hidden
tab_bar_style powerline
tab_bar_align left
tab_powerline_style angled

# ---------------------------------------------------------


# ---------------------------------------------------------
# Fonts

# BEGIN_KITTY_FONTS
font_family      family="FiraCode Nerd Font"
bold_font        auto
italic_font      auto
bold_italic_font auto
# END_KITTY_FONTS

font_size 12

# adjust_line_height  0
# adjust_column_width 0
# adjust_baseline 0
# ---------------------------------------------------------


# ---------------------------------------------------------
#  Neovim zen-mode-nvim
#  - change the font size on kitty when in zen mode
allow_remote_control socket-only
listen_on unix:/tmp/kitty
# ---------------------------------------------------------

# Scrollback
# Default less command
scrollback_pager less --chop-long-lines --RAW-CONTROL-CHARS +INPUT_LINE_NUMBER
# Neovim
scrollback_pager astro
Linux specific configurations

Linux specific configuration is automatically loaded if OS detected as Linux Ctrl Shift t to open a new tab in kitty using the working directory of the current tab.

# ---------------------------------------------------------
# Practicalli Kitty terminal - Linux configuration
#
# Configuration specific to using Linux operating system,
# especially with a tiling window manager without decorations
# e.g. Regoligth Desktop
# ---------------------------------------------------------


# ---------------------------------------------------------
# Key bindings

# Open new tab in current window
map ctrl+shift+t launch --cwd=current --type=tab

# ---------------------------------------------------------


# ---------------------------------------------------------
# Terminal app visuals
# - OS specific

enable_audio_bell no
# visual_bell_color none

# Hide window menu bar (e.g for Gnome)
hide_window_decorations yes

# Transparent terminal
#
# Very transparent
# background_opacity 0.64
# Subtle transparency
# background_opacity 0.92
# ---------------------------------------------------------

Create your own custom Kitty configuration using the example configuration provided by Kitty terminal.

Copy Default Kitty Config

cp /usr/share/doc/kitty/examples/kitty.conf ~/.config/kitty/

Fontsλ︎

Set the font family in the kitty.conf configuration file

Configure Kitty Font from Practicalli Dotfiles

$HOME/.config/kitty/kitty.conf
font_family      family="FiraCode Nerd Font"
bold_font        auto
italic_font      auto
bold_italic_font auto
font_size        16

Nerd Fonts provide symbols and icons to Neovim and other terminal tools that support graphics, e.g Powerline10k command prompt themes

Nerd Fonts already included in Kitty Terminal

Nerd Fonts do not need to be installed when using Kitty Terminal as they are already available.

Not Required - Manually Install Nerdfonts

Manually installing fonts is not required, however, for completeness this is a previous approach that was used:

Download a Nerd Font and configure the font in kitty.conf

Or download the Symbols Nerd Font font package for use with any font and add the Nerd Font symbols to Kitty via a symbol map configuration.

Include Nerdfont Symbols only

$HOME/.config/kitty.conf
# Icons from NerdFont (install Nerdfont symbols only theme)
# include ./nerdfont-icons.conf

Kitty Configuration for Nerd Fonts symbol map

$HOME/.config/kitty/nerdfont-icons.conf
# ---------------------------------------------------------
# NerdFont icons via symbol maps
#
# Kitty recommends mapping symbols rather than using patched fonts
#
# Download symbols only font from
# https://github.com/ryanoasis/nerd-fonts/blob/master/src/glyphs/Symbols-2048-em%20Nerd%20Font%20Complete.ttf
#
# List available fonts with:
#   kitty +list-fonts
#
# Troubleshoot missing/incorrect characters with:
#   kitty --debug-font-fallback
#
# Reference: https://erwin.co/kitty-and-nerd-fonts/

# Symbols Nerd Font - complete symbol_map

# "Nerd Fonts - Pomicons"
symbol_map  U+E000-U+E00D Symbols Nerd Font

# "Nerd Fonts - Powerline"
symbol_map U+e0a0-U+e0a2,U+e0b0-U+e0b3 Symbols Nerd Font

# "Nerd Fonts - Powerline Extra"
symbol_map U+e0a3-U+e0a3,U+e0b4-U+e0c8,U+e0cc-U+e0d2,U+e0d4-U+e0d4 Symbols Nerd Font

# "Nerd Fonts - Symbols original"
symbol_map U+e5fa-U+e62b Symbols Nerd Font

# "Nerd Fonts - Devicons"
symbol_map U+e700-U+e7c5 Symbols Nerd Font

# "Nerd Fonts - Font awesome"
symbol_map U+f000-U+f2e0 Symbols Nerd Font

# "Nerd Fonts - Font awesome extension"
symbol_map U+e200-U+e2a9 Symbols Nerd Font

# "Nerd Fonts - Octicons"
symbol_map U+f400-U+f4a8,U+2665-U+2665,U+26A1-U+26A1,U+f27c-U+f27c Symbols Nerd Font

# "Nerd Fonts - Font Linux"
symbol_map U+F300-U+F313 Symbols Nerd Font

#  Nerd Fonts - Font Power Symbols"
symbol_map U+23fb-U+23fe,U+2b58-U+2b58 Symbols Nerd Font

#  "Nerd Fonts - Material Design Icons"
symbol_map U+f500-U+fd46 Symbols Nerd Font

# "Nerd Fonts - Weather Icons"
symbol_map U+e300-U+e3eb Symbols Nerd Font

# Misc Code Point Fixes
symbol_map U+21B5,U+25B8,U+2605,U+2630,U+2632,U+2714,U+E0A3,U+E615,U+E62B Symbols Nerd Font

# ---------------------------------------------------------

Common Key mappingsλ︎

Terminal session management.

Ctrl+Shift+t to create a new session in a tab window

Ctrl+Shift+Left or Right to switch between tabs to the left or right

Ctrl+Shift+q to close a window

Ctrl+Shift+Enter to create a new session in split window

Ctrl+Shift+[ or ] to switch between window splits

Ctrl+Shift+w to close a window

Other common commands include:

Ctrl+Shift+= to increase the font size without restarting kitty

Ctrl+Shift+- to increase the font size without restarting kitty

Ctrl+Shift+F11 to toggle kitty full-screen

Ctrl+Shift+c copy from kitty terminal to clipboard

Ctrl+Shift+x copy from kitty terminal to clipboard

Ctrl+Shift+v paste into to kitty terminal from clipboard

Ctrl+Shift+s paste into to kitty terminal from clipboard

Kitten featuresλ︎

kittens provide additional features. Recommended features include:

  • Theme kitten - in-terminal theme browser and selector
  • diff - fast, side-by-side diff for the terminal with syntax highlighting
  • Clipboard - Copy/paste to the clipboard from shell scripts, even over SSH
  • SSH - SSH with automatic shell integration, connection re-use for low latency and easy cloning of local shell and editor configuration to the remote host

Themesλ︎

Theme kitten provides a simple way to browse available themes and select a theme for use

Browse available themes and apply one, or Ctrl+c to cancel

kitty +kitten themes

Change themes automatically to the given theme name (the theme must exist)

kitty +kitten theme theme-name
Themes used by Practicalli

Practicalli uses the Gruvbox Material Light Soft as the light theme

kitty +kitten themes Gruvbox Material Light Soft
Practicalli uses Gruvbox Material Dark Soft as the dark theme
kitty +kitten themes Gruvbox Material Dark Soft

The first time the theme kitten is run the following config is added to the ~.config/kitty/kitty.conf file and the chosen theme configuration written to the ~/.config/kitty/current-theme.conf file

This configuration shows the name of the theme, which is also in the top of the current-theme.conf file

# BEGIN_KITTY_THEME
# GitHub Dark
include current-theme.conf
# END_KITTY_THEME

Icon support from Nerd fonts, download and include the configuration to show icons in terminal based editors (e.g. Neovim, Emacs, etc.)

include ./nerdfont-icons.conf

Diffλ︎

The Diff kitten provides a fast way to compare files, although there is no support for merging changes.

Kitty supports diff of image files, showing the two images side by side.

kitty +kitten diff file1 file2

, or > jumps to next diff match

. or < jumps to previous diff match

SSHλ︎

The +kitten option ensures the remote environment is configured correctly for the Kitty terminal

kitty +kitten ssh hostname

Image viewerλ︎

View images with kitty

kitty +kitten icat /path/to/image

create an alias in your shell configuration file, e.g. shell-aliases

View images with

alias icat="kitten icat"

Kitty kitten icat