176 lines
5.2 KiB
Plaintext
176 lines
5.2 KiB
Plaintext
= kitty - A terminal emulator
|
|
:toc:
|
|
:toc-placement!:
|
|
// START_SHORTCUT_BLOCK
|
|
:sc_paste_from_clipboard: ctrl+shift+v
|
|
:sc_paste_from_selection: ctrl+shift+s
|
|
:sc_copy_to_clipboard: ctrl+shift+c
|
|
:sc_scroll_line_up: ctrl+shift+up
|
|
:sc_scroll_line_down: ctrl+shift+down
|
|
:sc_scroll_page_up: ctrl+shift+page_up
|
|
:sc_scroll_page_down: ctrl+shift+page_down
|
|
:sc_scroll_home: ctrl+shift+home
|
|
:sc_scroll_end: ctrl+shift+end
|
|
:sc_new_window: ctrl+shift+enter
|
|
:sc_next_window: ctrl+shift+]
|
|
:sc_previous_window: ctrl+shift+[
|
|
:sc_close_window: ctrl+shift+w
|
|
:sc_next_layout: ctrl+shift+l
|
|
:sc_first_window: ctrl+shift+1
|
|
:sc_second_window: ctrl+shift+2
|
|
:sc_third_window: ctrl+shift+3
|
|
:sc_fourth_window: ctrl+shift+4
|
|
:sc_fifth_window: ctrl+shift+5
|
|
:sc_sixth_window: ctrl+shift+6
|
|
:sc_seventh_window: ctrl+shift+7
|
|
:sc_eighth_window: ctrl+shift+8
|
|
:sc_ninth_window: ctrl+shift+9
|
|
:sc_tenth_window: ctrl+shift+0
|
|
:sc_next_tab: ctrl+shift+right
|
|
:sc_previous_tab: ctrl+shift+left
|
|
:sc_new_tab: ctrl+shift+t
|
|
:sc_close_tab: ctrl+shift+q
|
|
// END_SHORTCUT_BLOCK
|
|
|
|
image::https://travis-ci.org/kovidgoyal/kitty.svg?branch=master[Build status, link=https://travis-ci.org/kovidgoyal/kitty]
|
|
|
|
.Major features
|
|
* Uses OpenGL+FreeType for rendering, does not depend on any GUI
|
|
toolkits.
|
|
|
|
* Supports tiling multiple terminal windows side by side in different
|
|
layouts without needing to use an extra program like tmux
|
|
|
|
* Supports all modern terminal features: unicode, true-color, mouse
|
|
protocol, focus tracking, bracketed paste and so on.
|
|
|
|
* Easily hackable (UI layer written in python, inner loops in C for
|
|
speed). Less than ten thousand lines of code.
|
|
|
|
* Rendering of text is done in an actual character grid, so the common
|
|
problems with most Terminals when using wide characters/complex scripts
|
|
do not occur. The downside is that scripts with complex glyph layout,
|
|
such as Arabic do not render well.
|
|
|
|
toc::[]
|
|
|
|
|
|
== Installation
|
|
|
|
kitty is designed to run from source, for easy hackability. Make sure
|
|
the following dependencies are installed first.
|
|
|
|
.Dependencies
|
|
* python >= 3.5
|
|
* glew >= 2.0
|
|
* glfw-dev >= 3.2
|
|
* freetype
|
|
* fontconfig
|
|
* gcc (required for building, clang should also work, but it is not tested)
|
|
* pkg-config (required for building)
|
|
|
|
Install kitty with:
|
|
|
|
....
|
|
git clone https://github.com/kovidgoyal/kitty && cd kitty
|
|
....
|
|
|
|
Now build the C parts of kitty with the following command:
|
|
|
|
....
|
|
python3 setup.py build
|
|
....
|
|
|
|
You can run kitty, as:
|
|
|
|
....
|
|
python3 /path/to/kitty/folder
|
|
....
|
|
|
|
== Design philosophy
|
|
|
|
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). It's configuration is a simple, human editable, single file for
|
|
easy reproducability (I like to store config files 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) and Python (for
|
|
easy hackability of the UI). It does not depend on any large and complex
|
|
UI toolkit, using only OpenGL+FreeType 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 less effort.
|
|
|
|
== Tabs and Windows
|
|
|
|
kitty is capable of running multiple programs organized into tabs and
|
|
windows. The top level of organization is the _Tab_. Each tab consists
|
|
of one or more _windows_. The windows can be arranged in multiple
|
|
different layouts, like windows are organized in a tiling window
|
|
manager. The keyboard controls (which are all customizable) for tabs and
|
|
windows are:
|
|
|
|
[options="header"]
|
|
|===
|
|
|Action |Shortcut
|
|
|
|
|New tab | {sc_new_tab}
|
|
|
|
|Close tab | {sc_close_tab}
|
|
|
|
|
|
|===
|
|
|
|
== Configuration
|
|
|
|
kitty is highly customizable, everything from keyboard shortcuts, to
|
|
painting frames-per-second. See the heavily commented
|
|
link:kitty/kitty.conf[default config file]. By default kitty looks for a
|
|
config file in the OS config directory (usually
|
|
`~/.config/kitty/kitty.conf` on linux) but you can pass a specific path
|
|
via the `--config` option.
|
|
|
|
== Startup Sessions
|
|
|
|
You can control the tabs, window layout, working directory, startup
|
|
programs, etc. by creating a "session" file and using the `--session`
|
|
command line flag. For example:
|
|
|
|
....
|
|
# Set the window layout for the current tab
|
|
layout tall
|
|
# Set the working directory for the current tab
|
|
cd ~
|
|
# Create a window and run the specified command in it
|
|
launch zsh
|
|
launch vim
|
|
launch irssi --profile x
|
|
|
|
# Create a new tab (the part after new_tab is the optional tab name which will
|
|
# be displayed in the tab bar, if ommitted, the title of the active window will
|
|
# be used instead)
|
|
new_tab my tab
|
|
cd ~/somewhere
|
|
# Set the layouts allowed in this tab
|
|
enabled_layouts tall, stack
|
|
layout stack
|
|
launch zsh
|
|
# Make the current window the active (focused) window
|
|
focus
|
|
launch emacs
|
|
....
|
|
|
|
== Resources on terminal behavior
|
|
|
|
http://invisible-island.net/xterm/ctlseqs/ctlseqs.html
|
|
|
|
https://en.wikipedia.org/wiki/C0_and_C1_control_codes
|
|
|
|
http://vt100.net/
|