kitty is a fast, feature-rich, GPU based terminal emulator written in C and Python with nice features for the keyboard driven humans like me.
Although it's in the official repos, the version of Debian is quite old, instead you can install it for the current user with:
curl -L https://sw.kovidgoyal.net/kitty/installer.sh | sh /dev/stdin
You'll need to add the next alias too to your
It's configuration is a simple, human editable, single file for easy reproducibility stored at
Create an alias in your
alias icat="kitty +kitten icat"
The themes kitten allows you to easily change color themes, from a collection of almost two hundred pre-built themes available at kitty-themes. To use it run:
kitty +kitten themes
The kitten allows you to pick a theme, with live previews of the colors. You can choose between light and dark themes and search by theme name by just typing a few characters from the name.
If you want to tweak some colors once you select a theme, you can use terminal sexy.
A number between 0 and 1, where 1 is opaque and 0 is fully transparent. This will only work if supported by the OS (for instance, when using a compositor under X11).
If you're using i3wm you need to configure compton
Install it with
sudo apt-get install compton, and configure i3 to start it in the background adding
exec --no-startup-id compton to your i3 config.
I hate the auditive terminal bell, disable it with:
By default the movement is not vim friendly because if you use the same keystrokes, they will be captured by kitty and not forwarded to the application. The closest I got is:
# Movement map ctrl+shift+k scroll_line_up map ctrl+shift+j scroll_line_down map ctrl+shift+u scroll_page_up map ctrl+shift+d scroll_page_down
If you need more fine grained movement, use the scrollback buffer.
kitty supports scrolling back to view history, just like most terminals. You can use either keyboard shortcuts or the mouse scroll wheel to do so. However, kitty has an extra, neat feature. Sometimes you need to explore the scrollback buffer in more detail, maybe search for some text or refer to it side-by-side while typing in a follow-up command. kitty allows you to do this by pressing the
ctrl+shift+h key-combination, which will open the scrollback buffer in your favorite pager program (which is less by default). Colors and text formatting are preserved. You can explore the scrollback buffer comfortably within the pager.
nvim as the pager follow this discussion, the latest working snippet was:
# Scrollback buffer # https://sw.kovidgoyal.net/kitty/overview/#the-scrollback-buffer # `bash -c '...'` Run everything in a shell taking the scrollback content on stdin # `-u NORC` Load plugins but not initialization files # `-c "map q :qa!<CR>"` Close with `q` key # `-c "autocmd TermOpen * normal G"` On opening of the embedded terminal go to last line # `-c "terminal cat /proc/$$/fd/0 -"` Open the embedded terminal and read stdin of the shell # `-c "set clipboard+=unnamedplus"` Always use clipboard to yank/put instead of having to specify + scrollback_pager bash -c 'nvim </dev/null -u NORC -c "map q :qa!<CR>" -c "autocmd TermOpen * normal G" -c "terminal cat /proc/$$/fd/0 -" -c "set clipboard+=unnamedplus" -c "call cursor(CURSOR_LINE, CURSOR_COLUMN)"'
To make the history scrollback infinite add the next lines:
scrollback_lines -1 scrollback_pager_history_size 0
# Clipboard map ctrl+v paste_from_clipboard
This happens because the kitty terminfo files are not available on the server. You can ssh in using the following command which will automatically copy the terminfo files to the server:
kitty +kitten ssh myserver
This ssh kitten takes all the same command line arguments as ssh, you can alias it to ssh in your shell’s rc files to avoid having to type it each time:
alias ssh="kitty +kitten ssh"
Reasons to migrate from urxvt to kitty⚑
- It doesn't fuck up your terminal colors.
- You can use peek to record your screen.
- Easier to extend.