Linux系统(Ubuntu/Arch)下Kitty安装指南

Kitty

Outlook

The fast, feature-rich, GPU based terminal emulator

This is a set of config files based on Kitty by Hydraallen.


Introduction

kitty is designed for power keyboard users. To that end all its controls work with the keyboard (although it fully supports mouse interactions as well). Its configuration is a simple, human editable, single file for easy reproducibility (I like to store configuration in source control).

​ The code in kitty is designed to be simple, modular and hackable. It is written in a mix of C (for performance sensitive parts), Python (for easy extensibility and flexibility of the UI) and Go (for the command line kittens). It does not depend on any large and complex UI toolkit, using only OpenGL for rendering everything.

​ Finally, kitty is designed from the ground up to support all modern terminal features, such as Unicode, true color, bold/italic fonts, text formatting, etc. It even extends existing text formatting escape codes, to add support for features not available elsewhere, such as colored and styled (curly) underlines. One of the design goals of kitty is to be easily extensible so that new features can be added in the future with relatively little effort.


Installation

​ Kitty is available in the official repositories of all major Linux distributions, and you can use your favorite package manager to install the kitty package. However, note that some Linux distribution packages are woefully outdated. kitty is available in a vast number of package repositories for macOS and Linux.

​ To install it, simply open a terminal and type the following command depending on your operating system:

  • On Ubuntu and Debian-based distributions:
$ sudo apt update && sudo apt install kitty
  • On Arch Linux based distributions:
$ sudo pacman -S kitty
  • On Fedora Workstation
$ sudo dnf -y install kitty

​ After the installation process is complete, you can launch it from the Applications menu.

​ By the way, if you’re interested in the original way of installation, you can click here for more information.


Customization

​ Obviously, you can use the default settings and themes in your Kitty terminal, it’s very useful. However, I will show you some basic optional customizations that you can apply to your Kitty to make it even more beautiful.

If you don’t want to meet the trouble of configuring your own file, then you can clone my config file by using:

git clone git@github.com:Hydraallen/kitty.git ~/.config/kitty/

​ Or, if you enjoy these troubleshooting process, then keep to the following steps.

​ To create a configuration file ~/.config/kitty/ in the directory, you can do it in your manually create a new one in Explorer, or simply tape the following lines into your terminal.:

  • For Vim users:
vim ~/.config/kitty/kitty.conf
  • For Nano users:
nano ~/.config/kitty/kitty.conf

​ Copy and paste the following lines into the file:

# 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

# Window Size
remember_window_size yes
shell_integration no-title

​ To save the changes and quit, please press Escape to exit the vim editor, then type :wq.

​ Nano users can simply press Ctrl+O and Ctrl+X to save and exit.

​ Tape neofetch if you’ve downloaded. And you may end up with an interface that looks similar to this:

Shortcuts

Tabs

ActionShortcut
New tabctrl+shift+t (also ⌘+t on macOS)
Close tabctrl+shift+q (also ⌘+w on macOS)
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 (also ⇧+⌘+i on macOS)

Windows

ActionShortcut
New windowctrl+shift+enter (also ⌘+↩ on macOS)
New OS windowctrl+shift+n (also ⌘+n on macOS)
Close windowctrl+shift+w (also ⇧+⌘+d on macOS)
Resize windowctrl+shift+r (also ⌘+r on macOS)
Next windowctrl+shift+\]
Previous window ctrl+shift+[
Move window forwardctrl+shift+f
Move window backwardctrl+shift+b
Move window to topctrl+shift+
Visually focus windowctrl+shift+f7
Visually swap windowctrl+shift+f8
Focus specific windowctrl+shift+1, ctrl+shift+2ctrl+shift+0 (also ⌘+1, ⌘+2 … ⌘+9 on macOS) (clockwise from the top-left)

Other keyboard shortcuts

The full list of actions that can be mapped to key presses is available here.

ActionShortcut
Show this helpctrl+shift+f1
Copy to clipboardctrl+shift+c (also ⌘+c on macOS)
Paste from clipboardctrl+shift+v (also ⌘+v on macOS)
Paste from selectionctrl+shift+s
Pass selection to programctrl+shift+o
Increase font sizectrl+shift+equal (also ⌘++ on macOS)
Decrease font sizectrl+shift+minus (also ⌘+- on macOS)
Restore font sizectrl+shift+backspace (also ⌘+0 on macOS)
Toggle fullscreenctrl+shift+f11 (also ⌃+⌘+f on macOS)
Toggle maximizedctrl+shift+f10
Input Unicode characterctrl+shift+u (also ⌃+⌘+space on macOS)
Open URL in web browserctrl+shift+e
Reset the terminalctrl+shift+delete (also ⌥+⌘+r on macOS)
Edit kitty.confctrl+shift+f2 (also ⌘+, on macOS)
Reload kitty.confctrl+shift+f5 (also ⌃+⌘+, on macOS)
Debug kitty.confctrl+shift+f6 (also ⌥+⌘+, on macOS)
Open a kitty shellctrl+shift+escape
Increase background opacityctrl+shift+a>m
Decrease background opacityctrl+shift+a>l
Full background opacityctrl+shift+a>1
Reset background opacityctrl+shift+a>d

Q&A

Please search the Frequently Asked Questions carefully before asking and contact TechJI members if needed.

Contrbuting

​ If you encounter any problems in using the project, you can submit an issue or fork this project to submit an pull request. For pull requests, please be sure to have consistent style to existing modules, follow PEP 8, have clear identifier naming, and have proper comments.