One of the ubiquitous facts with ROS (Robot Operating System) developers is the use of many terminal windows for running different ROS commands. This is where Kitty comes in handy because switching between tabs or terminal windows can be annoying, especially when working with many terminal windows.
What is Kitty?
Kitty is a fast, feature-rich and GPU-based terminal emulator. It is cross-platform, very customizable and extensible with kittens using Python scripts.
Installation
There are many options for installing Kitty, such as binary installation, manual installation and building from source.
Binary Installation
To install the pre-built kitty binaries, run the following command in your terminal:
curl -L https://sw.kovidgoyal.net/kitty/installer.sh | sh /dev/stdin
This will be installed in ~/.local/kitty.app
.
Manually Installation
To install manually, download kitty-released executable files here.
Building from Source
To build Kitty directly from the source code, follow the instructions here.
Kitty might not be added to PATH from your installation. To do this run the following command
ln -sf ~/.local/kitty.app/bin/kitty ~/.local/kitty.app/bin/kitten ~/.local/bin/
To make the Kitty icon appear in your app launcher or menus, run the following
cp ~/.local/kitty.app/share/applications/kitty.desktop ~/.local/share/applications/
How does Kitty solve our problem?
Addressing the issue of having many terminal windows, the best way is to be able to split the terminal into different screens. The traditional solution for this is to install a terminal multiplexer, like tmux
which can be very difficult to use and customize.
But Kitty comes with the ability to split terminal screens of the box.
Some of the shortcuts to split screen and navigate between are highlighted below:
Shortcut | Action |
ctrl + shift + enter | Open new window |
ctrl + shift + w | Close Window |
ctrl + shift + ] | Move to the next window |
ctrl + shift + [ | Move to the previous window |
ctrl + shift r | Resize window |
ctrl + shift + f | Move the current window forward |
ctrl + shift + b | Move the current window backwards |
For more Kitty shortcuts, check here.
With this, I can run and see the running of demo_nodes_cpp talker, demo_node_py listener, turtlesim_node and turtle_teleop_key
using the single terminal window as it is in the picture below.
Miscellaneous
There are also many other features of Kitty, which include:
Viewing images within the terminal
Opening different file types within the terminal
Navigating previous command outputs
Interactive shell, etc
All credits ๐ go to Kovid Goyal for creating this terminal emulator. If you enjoy using Kitty, you can give the project a star โญ on GitHub.