Kitty: Difference between revisions
Jump to navigation
Jump to search
Line 47: | Line 47: | ||
# map ctrl+shift+backspace change_font_size current 0 |
# map ctrl+shift+backspace change_font_size current 0 |
||
map ctrl+0 change_font_size current 0 |
map ctrl+0 change_font_size current 0 |
||
</source> |
|||
* Add window splitting / zooming: |
|||
<source lang="bash"> |
|||
enabled_layouts splits:split_axis=horizontal, stack |
|||
# Create a new window splitting the space used by the existing one so that |
|||
# the two windows are placed one above the other |
|||
map ctrl+shift+o launch --location=hsplit |
|||
# Create a new window splitting the space used by the existing one so that |
|||
# the two windows are placed side by side |
|||
map ctrl+shift+e launch --location=vsplit |
|||
# Create a new window splitting the space used by the existing one so that |
|||
# the two windows are placed side by side if the existing window is wide or |
|||
# one above the other if the existing window is tall. |
|||
# map f4 launch --location=split |
|||
# Rotate the current split, changing its split axis from vertical to |
|||
# horizontal or vice versa |
|||
# map f7 layout_action rotate |
|||
# Move the active window in the indicated direction |
|||
# map shift+up move_window up |
|||
# map shift+left move_window left |
|||
# map shift+right move_window right |
|||
# map shift+down move_window down |
|||
# Move the active window to the indicated screen edge |
|||
# map ctrl+shift+up layout_action move_to_screen_edge top |
|||
# map ctrl+shift+left layout_action move_to_screen_edge left |
|||
# map ctrl+shift+right layout_action move_to_screen_edge right |
|||
# map ctrl+shift+down layout_action move_to_screen_edge bottom |
|||
# Switch focus to the neighboring window in the indicated direction |
|||
map ctrl+shift+h neighboring_window left |
|||
map ctrl+shift+l neighboring_window right |
|||
map ctrl+shift+k neighboring_window up |
|||
map ctrl+shift+j neighboring_window down |
|||
# Note: use ctrl-shift-r to resize the current window |
# Note: use ctrl-shift-r to resize the current window |
||
# Zoom on current window |
|||
map ctrl+shift+z toggle_layout stack |
|||
</source> |
</source> |
||
Revision as of 14:01, 18 July 2023
A cross-platform, fast, feature-rich, GPU based terminal, with support for hyperlinks, image viewer.
References
Install / config
- See also Kitty FAQ
- Setup terminfo
# SSH locally so that kitty will install terminfo file automatically (in ~/.terminfo/kitty.terminfo)
kitty +kitten ssh localhost
# Can also copy the file manually:
# See https://sw.kovidgoyal.net/kitty/kittens/ssh/#manual-terminfo-copy
infocmp -a xterm-kitty | ssh myserver tic -x -o \~/.terminfo /dev/stdin
- Add
xterm-kitty
to ~/.dircolors.cfg
TERM xterm-color
TERM xterm-debian
+TERM xterm-kitty
# Below are the color init strings for the basic file types. A color init
# string consists of one or more of the following numeric codes:
- Configure font thickness in white themes, .config/kitty/kitty.conf:
# See kitty.conf help text or https://sw.kovidgoyal.net/kitty/conf/#opt-kitty.text_composition_strategy on how to setup this variable
# See https://github.com/kovidgoyal/kitty/issues/6197
# See background tech details at: https://github.com/kovidgoyal/kitty/pull/5969
# This setting gives pixel identical rendering as gnome-terminator with light themes
text_composition_strategy 1.6 0
- Add font resize shortcut:
# See https://sw.kovidgoyal.net/kitty/conf/#conf-kitty-shortcuts-layout
# Resize fonts in current OS window
map ctrl+shift+equal change_font_size current +1.0
map ctrl+shift+plus change_font_size current +1.0
map ctrl+shift+kp_add change_font_size current +1.0
map ctrl+minus change_font_size current -1.0
map ctrl+shift+kp_subtract change_font_size current -1.0
# map ctrl+shift+backspace change_font_size current 0
map ctrl+0 change_font_size current 0
- Add window splitting / zooming:
enabled_layouts splits:split_axis=horizontal, stack
# Create a new window splitting the space used by the existing one so that
# the two windows are placed one above the other
map ctrl+shift+o launch --location=hsplit
# Create a new window splitting the space used by the existing one so that
# the two windows are placed side by side
map ctrl+shift+e launch --location=vsplit
# Create a new window splitting the space used by the existing one so that
# the two windows are placed side by side if the existing window is wide or
# one above the other if the existing window is tall.
# map f4 launch --location=split
# Rotate the current split, changing its split axis from vertical to
# horizontal or vice versa
# map f7 layout_action rotate
# Move the active window in the indicated direction
# map shift+up move_window up
# map shift+left move_window left
# map shift+right move_window right
# map shift+down move_window down
# Move the active window to the indicated screen edge
# map ctrl+shift+up layout_action move_to_screen_edge top
# map ctrl+shift+left layout_action move_to_screen_edge left
# map ctrl+shift+right layout_action move_to_screen_edge right
# map ctrl+shift+down layout_action move_to_screen_edge bottom
# Switch focus to the neighboring window in the indicated direction
map ctrl+shift+h neighboring_window left
map ctrl+shift+l neighboring_window right
map ctrl+shift+k neighboring_window up
map ctrl+shift+j neighboring_window down
# Note: use ctrl-shift-r to resize the current window
# Zoom on current window
map ctrl+shift+z toggle_layout stack
Tips
Increase font size
Increasing the font size dynamically seems to require to enable remote control
kitty -c NONE -o font_size=12 -o allow_remote_control=yes # Or through config
kitty @ set-font-size -- +2