kitty.conf 52 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485
  1. # vim:fileencoding=utf-8:ft=conf:foldmethod=marker
  2. #: Fonts {{{
  3. #: kitty has very powerful font management. You can configure
  4. #: individual font faces and even specify special fonts for particular
  5. #: characters.
  6. font_family InconsolataGo Nerd Font Mono
  7. bold_font auto
  8. italic_font auto
  9. bold_italic_font auto
  10. #: You can specify different fonts for the bold/italic/bold-italic
  11. #: variants. To get a full list of supported fonts use the `kitty
  12. #: list-fonts` command. By default they are derived automatically, by
  13. #: the OSes font system. Setting them manually is useful for font
  14. #: families that have many weight variants like Book, Medium, Thick,
  15. #: etc. For example::
  16. #: font_family Operator Mono Book
  17. #: bold_font Operator Mono Medium
  18. #: italic_font Operator Mono Book Italic
  19. #: bold_italic_font Operator Mono Medium Italic
  20. font_size 12.0
  21. #: Font size (in pts)
  22. force_ltr no
  23. #: kitty does not support BIDI (bidirectional text), however, for RTL
  24. #: scripts, words are automatically displayed in RTL. That is to say,
  25. #: in an RTL script, the words "HELLO WORLD" display in kitty as
  26. #: "WORLD HELLO", and if you try to select a substring of an RTL-
  27. #: shaped string, you will get the character that would be there had
  28. #: the the string been LTR. For example, assuming the Hebrew word
  29. #: ירושלים, selecting the character that on the screen appears to be ם
  30. #: actually writes into the selection buffer the character י. kitty's
  31. #: default behavior is useful in conjunction with a filter to reverse
  32. #: the word order, however, if you wish to manipulate RTL glyphs, it
  33. #: can be very challenging to work with, so this option is provided to
  34. #: turn it off. Furthermore, this option can be used with the command
  35. #: line program GNU FriBidi
  36. #: <https://github.com/fribidi/fribidi#executable> to get BIDI
  37. #: support, because it will force kitty to always treat the text as
  38. #: LTR, which FriBidi expects for terminals.
  39. adjust_line_height 0
  40. adjust_column_width 0
  41. #: Change the size of each character cell kitty renders. You can use
  42. #: either numbers, which are interpreted as pixels or percentages
  43. #: (number followed by %), which are interpreted as percentages of the
  44. #: unmodified values. You can use negative pixels or percentages less
  45. #: than 100% to reduce sizes (but this might cause rendering
  46. #: artifacts).
  47. adjust_baseline 0
  48. #: Adjust the vertical alignment of text (the height in the cell at
  49. #: which text is positioned). You can use either numbers, which are
  50. #: interpreted as pixels or a percentages (number followed by %),
  51. #: which are interpreted as the percentage of the line height. A
  52. #: positive value moves the baseline up, and a negative value moves
  53. #: them down. The underline and strikethrough positions are adjusted
  54. #: accordingly.
  55. # symbol_map U+E0A0-U+E0A3,U+E0C0-U+E0C7 PowerlineSymbols
  56. #: Map the specified unicode codepoints to a particular font. Useful
  57. #: if you need special rendering for some symbols, such as for
  58. #: Powerline. Avoids the need for patched fonts. Each unicode code
  59. #: point is specified in the form U+<code point in hexadecimal>. You
  60. #: can specify multiple code points, separated by commas and ranges
  61. #: separated by hyphens. symbol_map itself can be specified multiple
  62. #: times. Syntax is::
  63. #: symbol_map codepoints Font Family Name
  64. disable_ligatures never
  65. #: Choose how you want to handle multi-character ligatures. The
  66. #: default is to always render them. You can tell kitty to not render
  67. #: them when the cursor is over them by using cursor to make editing
  68. #: easier, or have kitty never render them at all by using always, if
  69. #: you don't like them. The ligature strategy can be set per-window
  70. #: either using the kitty remote control facility or by defining
  71. #: shortcuts for it in kitty.conf, for example::
  72. #: map alt+1 disable_ligatures_in active always
  73. #: map alt+2 disable_ligatures_in all never
  74. #: map alt+3 disable_ligatures_in tab cursor
  75. #: Note that this refers to programming ligatures, typically
  76. #: implemented using the calt OpenType feature. For disabling general
  77. #: ligatures, use the font_features setting.
  78. # font_features none
  79. #: Choose exactly which OpenType features to enable or disable. This
  80. #: is useful as some fonts might have features worthwhile in a
  81. #: terminal. For example, Fira Code Retina includes a discretionary
  82. #: feature, zero, which in that font changes the appearance of the
  83. #: zero (0), to make it more easily distinguishable from Ø. Fira Code
  84. #: Retina also includes other discretionary features known as
  85. #: Stylistic Sets which have the tags ss01 through ss20.
  86. #: For the exact syntax to use for individual features, see the
  87. #: Harfbuzz documentation <https://harfbuzz.github.io/harfbuzz-hb-
  88. #: common.html#hb-feature-from-string>.
  89. #: Note that this code is indexed by PostScript name, and not the font
  90. #: family. This allows you to define very precise feature settings;
  91. #: e.g. you can disable a feature in the italic font but not in the
  92. #: regular font.
  93. #: On Linux, these are read from the FontConfig database first and
  94. #: then this, setting is applied, so they can be configured in a
  95. #: single, central place.
  96. #: To get the PostScript name for a font, use kitty + list-fonts
  97. #: --psnames:
  98. #: .. code-block:: sh
  99. #: $ kitty + list-fonts --psnames | grep Fira
  100. #: Fira Code
  101. #: Fira Code Bold (FiraCode-Bold)
  102. #: Fira Code Light (FiraCode-Light)
  103. #: Fira Code Medium (FiraCode-Medium)
  104. #: Fira Code Regular (FiraCode-Regular)
  105. #: Fira Code Retina (FiraCode-Retina)
  106. #: The part in brackets is the PostScript name.
  107. #: Enable alternate zero and oldstyle numerals::
  108. #: font_features FiraCode-Retina +zero +onum
  109. #: Enable only alternate zero::
  110. #: font_features FiraCode-Retina +zero
  111. #: Disable the normal ligatures, but keep the calt feature which (in
  112. #: this font) breaks up monotony::
  113. #: font_features TT2020StyleB-Regular -liga +calt
  114. #: In conjunction with force_ltr, you may want to disable Arabic
  115. #: shaping entirely, and only look at their isolated forms if they
  116. #: show up in a document. You can do this with e.g.::
  117. #: font_features UnifontMedium +isol -medi -fina -init
  118. box_drawing_scale 0.001, 1, 1.5, 2
  119. #: Change the sizes of the lines used for the box drawing unicode
  120. #: characters These values are in pts. They will be scaled by the
  121. #: monitor DPI to arrive at a pixel value. There must be four values
  122. #: corresponding to thin, normal, thick, and very thick lines.
  123. #: }}}
  124. #: Cursor customization {{{
  125. cursor #cccccc
  126. #: Default cursor color
  127. cursor_text_color #111111
  128. #: Choose the color of text under the cursor. If you want it rendered
  129. #: with the background color of the cell underneath instead, use the
  130. #: special keyword: background
  131. cursor_shape block
  132. #: The cursor shape can be one of (block, beam, underline). Note that
  133. #: when reloading the config this will be changed only if the cursor
  134. #: shape has not been set by the program running in the terminal.
  135. cursor_beam_thickness 1.5
  136. #: Defines the thickness of the beam cursor (in pts)
  137. cursor_underline_thickness 2.0
  138. #: Defines the thickness of the underline cursor (in pts)
  139. cursor_blink_interval 0
  140. #: The interval (in seconds) at which to blink the cursor. Set to zero
  141. #: to disable blinking. Negative values mean use system default. Note
  142. #: that numbers smaller than repaint_delay will be limited to
  143. #: repaint_delay.
  144. cursor_stop_blinking_after 15.0
  145. #: Stop blinking cursor after the specified number of seconds of
  146. #: keyboard inactivity. Set to zero to never stop blinking.
  147. #: }}}
  148. #: Scrollback {{{
  149. scrollback_lines 50000
  150. #: Number of lines of history to keep in memory for scrolling back.
  151. #: Memory is allocated on demand. Negative numbers are (effectively)
  152. #: infinite scrollback. Note that using very large scrollback is not
  153. #: recommended as it can slow down performance of the terminal and
  154. #: also use large amounts of RAM. Instead, consider using
  155. #: scrollback_pager_history_size. Note that on config reload if this
  156. #: is changed it will only affect newly created windows, not existing
  157. #: ones.
  158. scrollback_pager less --chop-long-lines --RAW-CONTROL-CHARS +INPUT_LINE_NUMBER
  159. #: Program with which to view scrollback in a new window. The
  160. #: scrollback buffer is passed as STDIN to this program. If you change
  161. #: it, make sure the program you use can handle ANSI escape sequences
  162. #: for colors and text formatting. INPUT_LINE_NUMBER in the command
  163. #: line above will be replaced by an integer representing which line
  164. #: should be at the top of the screen. Similarly CURSOR_LINE and
  165. #: CURSOR_COLUMN will be replaced by the current cursor position.
  166. scrollback_pager_history_size 0
  167. #: Separate scrollback history size, used only for browsing the
  168. #: scrollback buffer (in MB). This separate buffer is not available
  169. #: for interactive scrolling but will be piped to the pager program
  170. #: when viewing scrollback buffer in a separate window. The current
  171. #: implementation stores the data in UTF-8, so approximatively 10000
  172. #: lines per megabyte at 100 chars per line, for pure ASCII text,
  173. #: unformatted text. A value of zero or less disables this feature.
  174. #: The maximum allowed size is 4GB. Note that on config reload if this
  175. #: is changed it will only affect newly created windows, not existing
  176. #: ones.
  177. scrollback_fill_enlarged_window no
  178. #: Fill new space with lines from the scrollback buffer after
  179. #: enlarging a window.
  180. wheel_scroll_multiplier 5.0
  181. #: Modify the amount scrolled by the mouse wheel. Note this is only
  182. #: used for low precision scrolling devices, not for high precision
  183. #: scrolling on platforms such as macOS and Wayland. Use negative
  184. #: numbers to change scroll direction.
  185. touch_scroll_multiplier 1.0
  186. #: Modify the amount scrolled by a touchpad. Note this is only used
  187. #: for high precision scrolling devices on platforms such as macOS and
  188. #: Wayland. Use negative numbers to change scroll direction.
  189. #: }}}
  190. #: Mouse {{{
  191. mouse_hide_wait 3.0
  192. #: Hide mouse cursor after the specified number of seconds of the
  193. #: mouse not being used. Set to zero to disable mouse cursor hiding.
  194. #: Set to a negative value to hide the mouse cursor immediately when
  195. #: typing text. Disabled by default on macOS as getting it to work
  196. #: robustly with the ever-changing sea of bugs that is Cocoa is too
  197. #: much effort.
  198. url_color #0087bd
  199. url_style curly
  200. #: The color and style for highlighting URLs on mouse-over. url_style
  201. #: can be one of: none, single, double, curly
  202. open_url_with default
  203. #: The program with which to open URLs that are clicked on. The
  204. #: special value default means to use the operating system's default
  205. #: URL handler.
  206. url_prefixes http https file ftp gemini irc gopher mailto news git
  207. #: The set of URL prefixes to look for when detecting a URL under the
  208. #: mouse cursor.
  209. detect_urls yes
  210. #: Detect URLs under the mouse. Detected URLs are highlighted with an
  211. #: underline and the mouse cursor becomes a hand over them. Even if
  212. #: this option is disabled, URLs are still clickable.
  213. url_excluded_characters
  214. #: Additional characters to be disallowed from URLs, when detecting
  215. #: URLs under the mouse cursor. By default, all characters legal in
  216. #: URLs are allowed.
  217. copy_on_select no
  218. #: Copy to clipboard or a private buffer on select. With this set to
  219. #: clipboard, simply selecting text with the mouse will cause the text
  220. #: to be copied to clipboard. Useful on platforms such as macOS that
  221. #: do not have the concept of primary selections. You can instead
  222. #: specify a name such as a1 to copy to a private kitty buffer
  223. #: instead. Map a shortcut with the paste_from_buffer action to paste
  224. #: from this private buffer. For example::
  225. #: map cmd+shift+v paste_from_buffer a1
  226. #: Note that copying to the clipboard is a security risk, as all
  227. #: programs, including websites open in your browser can read the
  228. #: contents of the system clipboard.
  229. strip_trailing_spaces never
  230. #: Remove spaces at the end of lines when copying to clipboard. A
  231. #: value of smart will do it when using normal selections, but not
  232. #: rectangle selections. always will always do it.
  233. select_by_word_characters @-./_~?&=%+#
  234. #: Characters considered part of a word when double clicking. In
  235. #: addition to these characters any character that is marked as an
  236. #: alphanumeric character in the unicode database will be matched.
  237. click_interval -1.0
  238. #: The interval between successive clicks to detect double/triple
  239. #: clicks (in seconds). Negative numbers will use the system default
  240. #: instead, if available, or fallback to 0.5.
  241. focus_follows_mouse no
  242. #: Set the active window to the window under the mouse when moving the
  243. #: mouse around
  244. pointer_shape_when_grabbed arrow
  245. #: The shape of the mouse pointer when the program running in the
  246. #: terminal grabs the mouse. Valid values are: arrow, beam and hand
  247. default_pointer_shape beam
  248. #: The default shape of the mouse pointer. Valid values are: arrow,
  249. #: beam and hand
  250. pointer_shape_when_dragging beam
  251. #: The default shape of the mouse pointer when dragging across text.
  252. #: Valid values are: arrow, beam and hand
  253. #: Mouse actions {{{
  254. #: Mouse buttons can be remapped to perform arbitrary actions. The
  255. #: syntax for doing so is:
  256. #: .. code-block:: none
  257. #: mouse_map button-name event-type modes action
  258. #: Where ``button-name`` is one of ``left``, ``middle``, ``right`` or
  259. #: ``b1 ... b8`` with added keyboard modifiers, for example:
  260. #: ``ctrl+shift+left`` refers to holding the ctrl+shift keys while
  261. #: clicking with the left mouse button. The number ``b1 ... b8`` can
  262. #: be used to refer to upto eight buttons on a mouse.
  263. #: ``event-type`` is one ``press``, ``release``, ``doublepress``,
  264. #: ``triplepress``, ``click`` and ``doubleclick``. ``modes``
  265. #: indicates whether the action is performed when the mouse is grabbed
  266. #: by the program running in the terminal, or not. It can have one or
  267. #: more or the values, ``grabbed,ungrabbed``. ``grabbed`` refers to
  268. #: when the program running in the terminal has requested mouse
  269. #: events. Note that the click and double click events have a delay of
  270. #: click_interval to disambiguate from double and triple presses.
  271. #: You can run kitty with the kitty --debug-input command line option
  272. #: to see mouse events. See the builtin actions below to get a sense
  273. #: of what is possible.
  274. #: If you want to unmap an action map it to ``no-op``. For example, to
  275. #: disable opening of URLs with a plain click::
  276. #: mouse_map left click ungrabbed no-op
  277. #: .. note::
  278. #: Once a selection is started, releasing the button that started it will
  279. #: automatically end it and no release event will be dispatched.
  280. mouse_map left click ungrabbed no-op
  281. mouse_map shift+left click grabbed,ungrabbed mouse_click_url_or_select
  282. mouse_map ctrl+left release grabbed,ungrabbed mouse_click_url
  283. #: Variant with ctrl+shift is present because the simple click based
  284. #: version has an unavoidable delay of click_interval, to disambiguate
  285. #: clicks from double clicks.
  286. mouse_map ctrl+shift+left press grabbed discard_event
  287. #: Prevent this press event from being sent to the program that has
  288. #: grabbed the mouse, as the corresponding release event is used to
  289. #: open a URL.
  290. mouse_map middle release ungrabbed paste_from_selection
  291. mouse_map left press ungrabbed mouse_selection normal
  292. mouse_map ctrl+alt+left press ungrabbed mouse_selection rectangle
  293. mouse_map left doublepress ungrabbed mouse_selection word
  294. mouse_map left triplepress ungrabbed mouse_selection line
  295. #: Select the entire line
  296. mouse_map ctrl+alt+left triplepress ungrabbed mouse_selection line_from_point
  297. #: Select from the clicked point to the end of the line
  298. mouse_map right press ungrabbed mouse_selection extend
  299. mouse_map shift+middle release ungrabbed,grabbed paste_selection
  300. mouse_map shift+left press ungrabbed,grabbed mouse_selection normal
  301. mouse_map shift+ctrl+alt+left press ungrabbed,grabbed mouse_selection rectangle
  302. mouse_map shift+left doublepress ungrabbed,grabbed mouse_selection word
  303. mouse_map shift+left triplepress ungrabbed,grabbed mouse_selection line
  304. #: Select the entire line
  305. mouse_map shift+ctrl+alt+left triplepress ungrabbed,grabbed mouse_selection line_from_point
  306. #: Select from the clicked point to the end of the line
  307. mouse_map shift+right press ungrabbed,grabbed mouse_selection extend
  308. #: }}}
  309. #: }}}
  310. #: Performance tuning {{{
  311. repaint_delay 10
  312. #: Delay (in milliseconds) between screen updates. Decreasing it,
  313. #: increases frames-per-second (FPS) at the cost of more CPU usage.
  314. #: The default value yields ~100 FPS which is more than sufficient for
  315. #: most uses. Note that to actually achieve 100 FPS you have to either
  316. #: set sync_to_monitor to no or use a monitor with a high refresh
  317. #: rate. Also, to minimize latency when there is pending input to be
  318. #: processed, repaint_delay is ignored.
  319. input_delay 3
  320. #: Delay (in milliseconds) before input from the program running in
  321. #: the terminal is processed. Note that decreasing it will increase
  322. #: responsiveness, but also increase CPU usage and might cause flicker
  323. #: in full screen programs that redraw the entire screen on each loop,
  324. #: because kitty is so fast that partial screen updates will be drawn.
  325. sync_to_monitor yes
  326. #: Sync screen updates to the refresh rate of the monitor. This
  327. #: prevents tearing (https://en.wikipedia.org/wiki/Screen_tearing)
  328. #: when scrolling. However, it limits the rendering speed to the
  329. #: refresh rate of your monitor. With a very high speed mouse/high
  330. #: keyboard repeat rate, you may notice some slight input latency. If
  331. #: so, set this to no.
  332. #: }}}
  333. #: Terminal bell {{{
  334. enable_audio_bell no
  335. #: Enable/disable the audio bell. Useful in environments that require
  336. #: silence.
  337. visual_bell_duration 0.0
  338. #: Visual bell duration. Flash the screen when a bell occurs for the
  339. #: specified number of seconds. Set to zero to disable.
  340. window_alert_on_bell yes
  341. #: Request window attention on bell. Makes the dock icon bounce on
  342. #: macOS or the taskbar flash on linux.
  343. bell_on_tab yes
  344. #: Show a bell symbol on the tab if a bell occurs in one of the
  345. #: windows in the tab and the window is not the currently focused
  346. #: window
  347. command_on_bell none
  348. #: Program to run when a bell occurs.
  349. #: }}}
  350. #: Window layout {{{
  351. remember_window_size no
  352. initial_window_width 800
  353. initial_window_height 600
  354. #: If enabled, the window size will be remembered so that new
  355. #: instances of kitty will have the same size as the previous
  356. #: instance. If disabled, the window will initially have size
  357. #: configured by initial_window_width/height, in pixels. You can use a
  358. #: suffix of "c" on the width/height values to have them interpreted
  359. #: as number of cells instead of pixels.
  360. enabled_layouts tall, stack
  361. #: The enabled window layouts. A comma separated list of layout names.
  362. #: The special value all means all layouts. The first listed layout
  363. #: will be used as the startup layout. Default configuration is all
  364. #: layouts in alphabetical order. For a list of available layouts, see
  365. #: the https://sw.kovidgoyal.net/kitty/index.html#layouts.
  366. window_resize_step_cells 2
  367. window_resize_step_lines 2
  368. #: The step size (in units of cell width/cell height) to use when
  369. #: resizing windows. The cells value is used for horizontal resizing
  370. #: and the lines value for vertical resizing.
  371. window_border_width 0.5pt
  372. #: The width of window borders. Can be either in pixels (px) or pts
  373. #: (pt). Values in pts will be rounded to the nearest number of pixels
  374. #: based on screen resolution. If not specified the unit is assumed to
  375. #: be pts. Note that borders are displayed only when more than one
  376. #: window is visible. They are meant to separate multiple windows.
  377. draw_minimal_borders yes
  378. #: Draw only the minimum borders needed. This means that only the
  379. #: minimum needed borders for inactive windows are drawn. That is only
  380. #: the borders that separate the inactive window from a neighbor. Note
  381. #: that setting a non-zero window margin overrides this and causes all
  382. #: borders to be drawn.
  383. window_margin_width 0
  384. #: The window margin (in pts) (blank area outside the border). A
  385. #: single value sets all four sides. Two values set the vertical and
  386. #: horizontal sides. Three values set top, horizontal and bottom. Four
  387. #: values set top, right, bottom and left.
  388. single_window_margin_width -1
  389. #: The window margin (in pts) to use when only a single window is
  390. #: visible. Negative values will cause the value of
  391. #: window_margin_width to be used instead. A single value sets all
  392. #: four sides. Two values set the vertical and horizontal sides. Three
  393. #: values set top, horizontal and bottom. Four values set top, right,
  394. #: bottom and left.
  395. window_padding_width 0
  396. #: The window padding (in pts) (blank area between the text and the
  397. #: window border). A single value sets all four sides. Two values set
  398. #: the vertical and horizontal sides. Three values set top, horizontal
  399. #: and bottom. Four values set top, right, bottom and left.
  400. placement_strategy center
  401. #: When the window size is not an exact multiple of the cell size, the
  402. #: cell area of the terminal window will have some extra padding on
  403. #: the sides. You can control how that padding is distributed with
  404. #: this option. Using a value of center means the cell area will be
  405. #: placed centrally. A value of top-left means the padding will be on
  406. #: only the bottom and right edges.
  407. active_border_color #00ff00
  408. #: The color for the border of the active window. Set this to none to
  409. #: not draw borders around the active window.
  410. inactive_border_color #cccccc
  411. #: The color for the border of inactive windows
  412. bell_border_color #ff5a00
  413. #: The color for the border of inactive windows in which a bell has
  414. #: occurred
  415. inactive_text_alpha 1.0
  416. #: Fade the text in inactive windows by the specified amount (a number
  417. #: between zero and one, with zero being fully faded).
  418. hide_window_decorations no
  419. #: Hide the window decorations (title-bar and window borders) with
  420. #: yes. On macOS, titlebar-only can be used to only hide the titlebar.
  421. #: Whether this works and exactly what effect it has depends on the
  422. #: window manager/operating system. Note that the effects of changing
  423. #: this setting when reloading config are undefined.
  424. resize_debounce_time 0.1
  425. #: The time (in seconds) to wait before redrawing the screen when a
  426. #: resize event is received. On platforms such as macOS, where the
  427. #: operating system sends events corresponding to the start and end of
  428. #: a resize, this number is ignored.
  429. resize_draw_strategy static
  430. #: Choose how kitty draws a window while a resize is in progress. A
  431. #: value of static means draw the current window contents, mostly
  432. #: unchanged. A value of scale means draw the current window contents
  433. #: scaled. A value of blank means draw a blank window. A value of size
  434. #: means show the window size in cells.
  435. resize_in_steps no
  436. #: Resize the OS window in steps as large as the cells, instead of
  437. #: with the usual pixel accuracy. Combined with an
  438. #: initial_window_width and initial_window_height in number of cells,
  439. #: this option can be used to keep the margins as small as possible
  440. #: when resizing the OS window. Note that this does not currently work
  441. #: on Wayland.
  442. confirm_os_window_close 0
  443. #: Ask for confirmation when closing an OS window or a tab that has at
  444. #: least this number of kitty windows in it. A value of zero disables
  445. #: confirmation. This confirmation also applies to requests to quit
  446. #: the entire application (all OS windows, via the quit action).
  447. #: }}}
  448. #: Tab bar {{{
  449. tab_bar_edge bottom
  450. #: Which edge to show the tab bar on, top or bottom
  451. tab_bar_margin_width 0.0
  452. #: The margin to the left and right of the tab bar (in pts)
  453. tab_bar_margin_height 0.0 0.0
  454. #: The margin above and below the tab bar (in pts). The first number
  455. #: is the margin between the edge of the OS Window and the tab bar and
  456. #: the second number is the margin between the tab bar and the
  457. #: contents of the current tab.
  458. tab_bar_style fade
  459. #: The tab bar style, can be one of: fade, separator, powerline, or
  460. #: hidden. In the fade style, each tab's edges fade into the
  461. #: background color, in the separator style, tabs are separated by a
  462. #: configurable separator, and the powerline shows the tabs as a
  463. #: continuous line. If you use the hidden style, you might want to
  464. #: create a mapping for the select_tab action which presents you with
  465. #: a list of tabs and allows for easy switching to a tab.
  466. tab_bar_min_tabs 2
  467. #: The minimum number of tabs that must exist before the tab bar is
  468. #: shown
  469. tab_switch_strategy previous
  470. #: The algorithm to use when switching to a tab when the current tab
  471. #: is closed. The default of previous will switch to the last used
  472. #: tab. A value of left will switch to the tab to the left of the
  473. #: closed tab. A value of right will switch to the tab to the right of
  474. #: the closed tab. A value of last will switch to the right-most tab.
  475. tab_fade 0.25 0.5 0.75 1
  476. #: Control how each tab fades into the background when using fade for
  477. #: the tab_bar_style. Each number is an alpha (between zero and one)
  478. #: that controls how much the corresponding cell fades into the
  479. #: background, with zero being no fade and one being full fade. You
  480. #: can change the number of cells used by adding/removing entries to
  481. #: this list.
  482. tab_separator " ┇"
  483. #: The separator between tabs in the tab bar when using separator as
  484. #: the tab_bar_style.
  485. tab_powerline_style angled
  486. #: The powerline separator style between tabs in the tab bar when
  487. #: using powerline as the tab_bar_style, can be one of: angled,
  488. #: slanted, or round.
  489. tab_activity_symbol none
  490. #: Some text or a unicode symbol to show on the tab if a window in the
  491. #: tab that does not have focus has some activity.
  492. tab_title_template "{title}"
  493. #: A template to render the tab title. The default just renders the
  494. #: title. If you wish to include the tab-index as well, use something
  495. #: like: {index}: {title}. Useful if you have shortcuts mapped for
  496. #: goto_tab N. If you prefer to see the index as a superscript, use
  497. #: {sup.index}. In addition you can use {layout_name} for the current
  498. #: layout name and {num_windows} for the number of windows in the tab.
  499. #: Note that formatting is done by Python's string formatting
  500. #: machinery, so you can use, for instance, {layout_name[:2].upper()}
  501. #: to show only the first two letters of the layout name, upper-cased.
  502. #: If you want to style the text, you can use styling directives, for
  503. #: example: {fmt.fg.red}red{fmt.fg.default}normal{fmt.bg._00FF00}green
  504. #: bg{fmt.bg.normal}. Similarly, for bold and italic:
  505. #: {fmt.bold}bold{fmt.nobold}normal{fmt.italic}italic{fmt.noitalic}.
  506. active_tab_title_template none
  507. #: Template to use for active tabs, if not specified falls back to
  508. #: tab_title_template.
  509. active_tab_foreground #000
  510. active_tab_background #eee
  511. active_tab_font_style bold-italic
  512. inactive_tab_foreground #444
  513. inactive_tab_background #999
  514. inactive_tab_font_style normal
  515. #: Tab bar colors and styles
  516. tab_bar_background none
  517. #: Background color for the tab bar. Defaults to using the terminal
  518. #: background color.
  519. #: }}}
  520. #: Color scheme {{{
  521. # witchhazel hypercolor https://witchhazel.thea.codes/
  522. background #1D2021
  523. foreground #F8F8F2
  524. background_opacity 1.0
  525. #: The opacity of the background. A number between 0 and 1, where 1 is
  526. #: opaque and 0 is fully transparent. This will only work if
  527. #: supported by the OS (for instance, when using a compositor under
  528. #: X11). Note that it only sets the background color's opacity in
  529. #: cells that have the same background color as the default terminal
  530. #: background. This is so that things like the status bar in vim,
  531. #: powerline prompts, etc. still look good. But it means that if you
  532. #: use a color theme with a background color in your editor, it will
  533. #: not be rendered as transparent. Instead you should change the
  534. #: default background color in your kitty config and not use a
  535. #: background color in the editor color scheme. Or use the escape
  536. #: codes to set the terminals default colors in a shell script to
  537. #: launch your editor. Be aware that using a value less than 1.0 is a
  538. #: (possibly significant) performance hit. If you want to dynamically
  539. #: change transparency of windows set dynamic_background_opacity to
  540. #: yes (this is off by default as it has a performance cost). Changing
  541. #: this setting when reloading the config will only work if
  542. #: dynamic_background_opacity was enabled in the original config.
  543. background_image none
  544. #: Path to a background image. Must be in PNG format.
  545. background_image_layout tiled
  546. #: Whether to tile or scale the background image.
  547. background_image_linear no
  548. #: When background image is scaled, whether linear interpolation
  549. #: should be used.
  550. dynamic_background_opacity no
  551. #: Allow changing of the background_opacity dynamically, using either
  552. #: keyboard shortcuts (increase_background_opacity and
  553. #: decrease_background_opacity) or the remote control facility.
  554. #: Changing this setting by reloading the config is not supported.
  555. background_tint 0.0
  556. #: How much to tint the background image by the background color. The
  557. #: tint is applied only under the text area, not margin/borders. Makes
  558. #: it easier to read the text. Tinting is done using the current
  559. #: background color for each window. This setting applies only if
  560. #: background_opacity is set and transparent windows are supported or
  561. #: background_image is set.
  562. dim_opacity 0.75
  563. #: How much to dim text that has the DIM/FAINT attribute set. One
  564. #: means no dimming and zero means fully dimmed (i.e. invisible).
  565. selection_foreground #000000
  566. #: The foreground for text selected with the mouse. A value of none
  567. #: means to leave the color unchanged.
  568. selection_background #fffacd
  569. #: The background for text selected with the mouse.
  570. #: The 16 terminal colors. There are 8 basic colors, each color has a
  571. #: dull and bright version. You can also set the remaining colors from
  572. #: the 256 color table as color16 to color255.
  573. # black
  574. color0 #424242
  575. color8 #928374
  576. # red
  577. color1 #FFA3C3
  578. color9 #FFB8D1
  579. # green
  580. color2 #A3FFCF
  581. color10 #81FFBE
  582. # yellow
  583. color3 #FFF781
  584. color11 #FFF9A3
  585. # blue
  586. color4 #64BECB
  587. color12 #81EEFF
  588. # magenta
  589. color5 #894E63
  590. color13 #F92672
  591. # cyan
  592. color6 #A3F3FF
  593. color14 #C8F8FF
  594. # white
  595. color7 #F8F8F2
  596. color15 #F8F8F0
  597. # mark1_foreground black
  598. #: Color for marks of type 1
  599. # mark1_background #98d3cb
  600. #: Color for marks of type 1 (light steel blue)
  601. # mark2_foreground black
  602. #: Color for marks of type 2
  603. # mark2_background #f2dcd3
  604. #: Color for marks of type 1 (beige)
  605. # mark3_foreground black
  606. #: Color for marks of type 3
  607. # mark3_background #f274bc
  608. #: Color for marks of type 1 (violet)
  609. #: }}}
  610. #: Advanced {{{
  611. shell .
  612. #: The shell program to execute. The default value of . means to use
  613. #: whatever shell is set as the default shell for the current user.
  614. #: Note that on macOS if you change this, you might need to add
  615. #: --login to ensure that the shell starts in interactive mode and
  616. #: reads its startup rc files.
  617. editor .
  618. #: The console editor to use when editing the kitty config file or
  619. #: similar tasks. A value of . means to use the environment variables
  620. #: VISUAL and EDITOR in that order. Note that this environment
  621. #: variable has to be set not just in your shell startup scripts but
  622. #: system-wide, otherwise kitty will not see it.
  623. close_on_child_death no
  624. #: Close the window when the child process (shell) exits. If no (the
  625. #: default), the terminal will remain open when the child exits as
  626. #: long as there are still processes outputting to the terminal (for
  627. #: example disowned or backgrounded processes). If yes, the window
  628. #: will close as soon as the child process exits. Note that setting it
  629. #: to yes means that any background processes still using the terminal
  630. #: can fail silently because their stdout/stderr/stdin no longer work.
  631. allow_remote_control no
  632. #: Allow other programs to control kitty. If you turn this on other
  633. #: programs can control all aspects of kitty, including sending text
  634. #: to kitty windows, opening new windows, closing windows, reading the
  635. #: content of windows, etc. Note that this even works over ssh
  636. #: connections. You can chose to either allow any program running
  637. #: within kitty to control it, with yes or only programs that connect
  638. #: to the socket specified with the kitty --listen-on command line
  639. #: option, if you use the value socket-only. The latter is useful if
  640. #: you want to prevent programs running on a remote computer over ssh
  641. #: from controlling kitty. Changing this option by reloading the
  642. #: config will only affect newly created windows.
  643. listen_on none
  644. #: Tell kitty to listen to the specified unix/tcp socket for remote
  645. #: control connections. Note that this will apply to all kitty
  646. #: instances. It can be overridden by the kitty --listen-on command
  647. #: line flag. This option accepts only UNIX sockets, such as
  648. #: unix:${TEMP}/mykitty or (on Linux) unix:@mykitty. Environment
  649. #: variables are expanded. If {kitty_pid} is present then it is
  650. #: replaced by the PID of the kitty process, otherwise the PID of the
  651. #: kitty process is appended to the value, with a hyphen. This option
  652. #: is ignored unless you also set allow_remote_control to enable
  653. #: remote control. See the help for kitty --listen-on for more
  654. #: details. Changing this option by reloading the config is not
  655. #: supported.
  656. # env
  657. #: Specify environment variables to set in all child processes. Note
  658. #: that environment variables are expanded recursively, so if you
  659. #: use::
  660. #: env MYVAR1=a
  661. #: env MYVAR2=${MYVAR1}/${HOME}/b
  662. #: The value of MYVAR2 will be a/<path to home directory>/b.
  663. update_check_interval 24
  664. #: Periodically check if an update to kitty is available. If an update
  665. #: is found a system notification is displayed informing you of the
  666. #: available update. The default is to check every 24 hrs, set to zero
  667. #: to disable. Changing this option by reloading the config is not
  668. #: supported.
  669. startup_session none
  670. #: Path to a session file to use for all kitty instances. Can be
  671. #: overridden by using the kitty --session command line option for
  672. #: individual instances. See
  673. #: https://sw.kovidgoyal.net/kitty/index.html#sessions in the kitty
  674. #: documentation for details. Note that relative paths are interpreted
  675. #: with respect to the kitty config directory. Environment variables
  676. #: in the path are expanded. Changing this option by reloading the
  677. #: config is not supported.
  678. clipboard_control write-clipboard write-primary read-clipboard-ask read-primary-ask
  679. #: Allow programs running in kitty to read and write from the
  680. #: clipboard. You can control exactly which actions are allowed. The
  681. #: set of possible actions is: write-clipboard read-clipboard write-
  682. #: primary read-primary. You can additionally specify no-append to
  683. #: disable kitty's protocol extension for clipboard concatenation. The
  684. #: default is to allow writing to the clipboard and primary selection
  685. #: with concatenation enabled. Note that enabling the read
  686. #: functionality is a security risk as it means that any program, even
  687. #: one running on a remote server via SSH can read your clipboard.
  688. allow_hyperlinks yes
  689. #: Process hyperlink (OSC 8) escape sequences. If disabled OSC 8
  690. #: escape sequences are ignored. Otherwise they become clickable
  691. #: links, that you can click by holding down ctrl+shift and clicking
  692. #: with the mouse. The special value of ``ask`` means that kitty will
  693. #: ask before opening the link.
  694. shell_integration enabled
  695. clone_source_strategies env_var,path
  696. term xterm-kitty
  697. #: The value of the TERM environment variable to set. Changing this
  698. #: can break many terminal programs, only change it if you know what
  699. #: you are doing, not because you read some advice on Stack Overflow
  700. #: to change it. The TERM variable is used by various programs to get
  701. #: information about the capabilities and behavior of the terminal. If
  702. #: you change it, depending on what programs you run, and how
  703. #: different the terminal you are changing it to is, various things
  704. #: from key-presses, to colors, to various advanced features may not
  705. #: work. Changing this option by reloading the config will only affect
  706. #: newly created windows.
  707. #: }}}
  708. #: OS specific tweaks {{{
  709. wayland_titlebar_color system
  710. #: Change the color of the kitty window's titlebar on Wayland systems
  711. #: with client side window decorations such as GNOME. A value of
  712. #: system means to use the default system color, a value of background
  713. #: means to use the background color of the currently active window
  714. #: and finally you can use an arbitrary color, such as #12af59 or red.
  715. macos_titlebar_color system
  716. #: Change the color of the kitty window's titlebar on macOS. A value
  717. #: of system means to use the default system color, a value of
  718. #: background means to use the background color of the currently
  719. #: active window and finally you can use an arbitrary color, such as
  720. #: #12af59 or red. WARNING: This option works by using a hack, as
  721. #: there is no proper Cocoa API for it. It sets the background color
  722. #: of the entire window and makes the titlebar transparent. As such it
  723. #: is incompatible with background_opacity. If you want to use both,
  724. #: you are probably better off just hiding the titlebar with
  725. #: hide_window_decorations.
  726. macos_option_as_alt left
  727. #: Use the option key as an alt key. With this set to no, kitty will
  728. #: use the macOS native Option+Key = unicode character behavior. This
  729. #: will break any Alt+key keyboard shortcuts in your terminal
  730. #: programs, but you can use the macOS unicode input technique. You
  731. #: can use the values: left, right, or both to use only the left,
  732. #: right or both Option keys as Alt, instead. Changing this setting by
  733. #: reloading the config is not supported.
  734. macos_hide_from_tasks no
  735. #: Hide the kitty window from running tasks (⌘+Tab) on macOS. Changing
  736. #: this setting by reloading the config is not supported.
  737. macos_quit_when_last_window_closed no
  738. #: Have kitty quit when all the top-level windows are closed. By
  739. #: default, kitty will stay running, even with no open windows, as is
  740. #: the expected behavior on macOS.
  741. macos_window_resizable yes
  742. #: Disable this if you want kitty top-level (OS) windows to not be
  743. #: resizable on macOS. Changing this setting by reloading the config
  744. #: will only affect newly created windows.
  745. macos_thicken_font 0
  746. #: Draw an extra border around the font with the given width, to
  747. #: increase legibility at small font sizes. For example, a value of
  748. #: 0.75 will result in rendering that looks similar to sub-pixel
  749. #: antialiasing at common font sizes.
  750. macos_traditional_fullscreen no
  751. #: Use the traditional full-screen transition, that is faster, but
  752. #: less pretty.
  753. macos_show_window_title_in all
  754. #: Show or hide the window title in the macOS window or menu-bar. A
  755. #: value of window will show the title of the currently active window
  756. #: at the top of the macOS window. A value of menubar will show the
  757. #: title of the currently active window in the macOS menu-bar, making
  758. #: use of otherwise wasted space. all will show the title everywhere
  759. #: and none hides the title in the window and the menu-bar.
  760. macos_custom_beam_cursor no
  761. #: Enable/disable custom mouse cursor for macOS that is easier to see
  762. #: on both light and dark backgrounds. WARNING: this might make your
  763. #: mouse cursor invisible on dual GPU machines. Changing this setting
  764. #: by reloading the config is not supported.
  765. linux_display_server auto
  766. #: Choose between Wayland and X11 backends. By default, an appropriate
  767. #: backend based on the system state is chosen automatically. Set it
  768. #: to x11 or wayland to force the choice. Changing this setting by
  769. #: reloading the config is not supported.
  770. #: }}}
  771. #: Keyboard shortcuts {{{
  772. #: Keys are identified simply by their lowercase unicode characters.
  773. #: For example: ``a`` for the A key, ``[`` for the left square bracket
  774. #: key, etc. For functional keys, such as ``Enter or Escape`` the
  775. #: names are present at https://sw.kovidgoyal.net/kitty/keyboard-
  776. #: protocol.html#functional-key-definitions. For a list of modifier
  777. #: names, see: GLFW mods
  778. #: <https://www.glfw.org/docs/latest/group__mods.html>
  779. #: On Linux you can also use XKB key names to bind keys that are not
  780. #: supported by GLFW. See XKB keys
  781. #: <https://github.com/xkbcommon/libxkbcommon/blob/master/xkbcommon/xkbcommon-
  782. #: keysyms.h> for a list of key names. The name to use is the part
  783. #: after the XKB_KEY_ prefix. Note that you can only use an XKB key
  784. #: name for keys that are not known as GLFW keys.
  785. #: Finally, you can use raw system key codes to map keys, again only
  786. #: for keys that are not known as GLFW keys. To see the system key
  787. #: code for a key, start kitty with the kitty --debug-input option.
  788. #: Then kitty will output some debug text for every key event. In that
  789. #: text look for ``native_code`` the value of that becomes the key
  790. #: name in the shortcut. For example:
  791. #: .. code-block:: none
  792. #: on_key_input: glfw key: 65 native_code: 0x61 action: PRESS mods: 0x0 text: 'a'
  793. #: Here, the key name for the A key is 0x61 and you can use it with::
  794. #: map ctrl+0x61 something
  795. #: to map ctrl+a to something.
  796. #: You can use the special action no_op to unmap a keyboard shortcut
  797. #: that is assigned in the default configuration::
  798. #: map kitty_mod+space no_op
  799. #: You can combine multiple actions to be triggered by a single
  800. #: shortcut, using the syntax below::
  801. #: map key combine <separator> action1 <separator> action2 <separator> action3 ...
  802. #: For example::
  803. #: map kitty_mod+e combine : new_window : next_layout
  804. #: this will create a new window and switch to the next available
  805. #: layout
  806. #: You can use multi-key shortcuts using the syntax shown below::
  807. #: map key1>key2>key3 action
  808. #: For example::
  809. #: map ctrl+f>2 set_font_size 20
  810. kitty_mod super
  811. #: The value of kitty_mod is used as the modifier for all default
  812. #: shortcuts, you can change it in your kitty.conf to change the
  813. #: modifiers for all the default shortcuts.
  814. clear_all_shortcuts no
  815. #: You can have kitty remove all shortcut definition seen up to this
  816. #: point. Useful, for instance, to remove the default shortcuts.
  817. # kitten_alias hints hints --hints-offset=0
  818. #: You can create aliases for kitten names, this allows overriding the
  819. #: defaults for kitten options and can also be used to shorten
  820. #: repeated mappings of the same kitten with a specific group of
  821. #: options. For example, the above alias changes the default value of
  822. #: kitty +kitten hints --hints-offset to zero for all mappings,
  823. #: including the builtin ones.
  824. #: Clipboard {{{
  825. # map kitty_mod+c copy_to_clipboard
  826. map ctrl+shift+c copy_to_clipboard
  827. #: There is also a copy_or_interrupt action that can be optionally
  828. #: mapped to Ctrl+c. It will copy only if there is a selection and
  829. #: send an interrupt otherwise. Similarly, copy_and_clear_or_interrupt
  830. #: will copy and clear the selection or send an interrupt if there is
  831. #: no selection.
  832. # map kitty_mod+v paste_from_clipboard
  833. map ctrl+shift+v paste_from_clipboard
  834. # map kitty_mod+s paste_from_selection
  835. # map shift+insert paste_from_selection
  836. # map kitty_mod+o pass_selection_to_program
  837. #: You can also pass the contents of the current selection to any
  838. #: program using pass_selection_to_program. By default, the system's
  839. #: open program is used, but you can specify your own, the selection
  840. #: will be passed as a command line argument to the program, for
  841. #: example::
  842. #: map kitty_mod+o pass_selection_to_program firefox
  843. #: You can pass the current selection to a terminal program running in
  844. #: a new kitty window, by using the @selection placeholder::
  845. #: map kitty_mod+y new_window less @selection
  846. #: }}}
  847. #: Scrolling {{{
  848. # map kitty_mod+up scroll_line_up
  849. # map kitty_mod+k scroll_line_up
  850. # map kitty_mod+down scroll_line_down
  851. # map kitty_mod+j scroll_line_down
  852. # map kitty_mod+page_up scroll_page_up
  853. # map kitty_mod+page_down scroll_page_down
  854. # map kitty_mod+home scroll_home
  855. # map kitty_mod+end scroll_end
  856. map shift+page_up scroll_page_up
  857. map shift+page_down scroll_page_down
  858. map shift+home scroll_home
  859. map shift+end scroll_end
  860. # map kitty_mod+h show_scrollback
  861. map kitty_mod+shift+h show_scrollback
  862. map kitty_mod+shift+z scroll_to_prompt -1
  863. map kitty_mod+shift+x scroll_to_prompt 1
  864. map f1 show_last_visited_command_output
  865. #: You can pipe the contents of the current screen + history buffer as
  866. #: STDIN to an arbitrary program using the ``launch`` function. For
  867. #: example, the following opens the scrollback buffer in less in an
  868. #: overlay window::
  869. #: map f1 launch --stdin-source=@screen_scrollback --stdin-add-formatting --type=overlay less +G -R
  870. #: For more details on piping screen and buffer contents to external
  871. #: programs, see launch.
  872. #: }}}
  873. #: Window management {{{
  874. # map kitty_mod+enter new_window
  875. map shift+enter new_window_with_cwd
  876. map kitty_mod+shift+enter new_window
  877. #: You can open a new window running an arbitrary program, for
  878. #: example::
  879. #: map kitty_mod+y launch mutt
  880. #: You can open a new window with the current working directory set to
  881. #: the working directory of the current window using::
  882. #: map ctrl+alt+enter launch --cwd=current
  883. #: You can open a new window that is allowed to control kitty via the
  884. #: kitty remote control facility by prefixing the command line with @.
  885. #: Any programs running in that window will be allowed to control
  886. #: kitty. For example::
  887. #: map ctrl+enter launch --allow-remote-control some_program
  888. #: You can open a new window next to the currently active window or as
  889. #: the first window, with::
  890. #: map ctrl+n launch --location=neighbor some_program
  891. #: map ctrl+f launch --location=first some_program
  892. #: For more details, see launch.
  893. # map kitty_mod+n new_os_window
  894. #: Works like new_window above, except that it opens a top level OS
  895. #: kitty window. In particular you can use new_os_window_with_cwd to
  896. #: open a window with the current working directory.
  897. # map kitty_mod+w close_window
  898. # map kitty_mod+] next_window
  899. # map kitty_mod+[ previous_window
  900. # map kitty_mod+f move_window_forward
  901. # map kitty_mod+b move_window_backward
  902. # map kitty_mod+` move_window_to_top
  903. # map kitty_mod+r start_resizing_window
  904. # map kitty_mod+1 first_window
  905. # map kitty_mod+2 second_window
  906. # map kitty_mod+3 third_window
  907. # map kitty_mod+4 fourth_window
  908. # map kitty_mod+5 fifth_window
  909. # map kitty_mod+6 sixth_window
  910. # map kitty_mod+7 seventh_window
  911. # map kitty_mod+8 eighth_window
  912. # map kitty_mod+9 ninth_window
  913. # map kitty_mod+0 tenth_window
  914. map kitty_mod+shift+j move_window_forward
  915. map kitty_mod+shift+k move_window_backward
  916. map kitty_mod+h neighboring_window left
  917. map kitty_mod+j neighboring_window down
  918. map kitty_mod+k neighboring_window up
  919. map kitty_mod+l neighboring_window right
  920. #: }}}
  921. #: Tab management {{{
  922. # map kitty_mod+right next_tab
  923. # map kitty_mod+left previous_tab
  924. # map kitty_mod+t new_tab
  925. # map kitty_mod+q close_tab
  926. # map kitty_mod+. move_tab_forward
  927. # map kitty_mod+, move_tab_backward
  928. # map kitty_mod+alt+t set_tab_title
  929. #: You can also create shortcuts to go to specific tabs, with 1 being
  930. #: the first tab, 2 the second tab and -1 being the previously active
  931. #: tab, and any number larger than the last tab being the last tab::
  932. #: map ctrl+alt+1 goto_tab 1
  933. #: map ctrl+alt+2 goto_tab 2
  934. #: Just as with new_window above, you can also pass the name of
  935. #: arbitrary commands to run when using new_tab and use
  936. #: new_tab_with_cwd. Finally, if you want the new tab to open next to
  937. #: the current tab rather than at the end of the tabs list, use::
  938. #: map ctrl+t new_tab !neighbor [optional cmd to run]
  939. #: }}}
  940. #: Layout management {{{
  941. map kitty_mod+enter next_layout
  942. # map kitty_mod+l next_layout
  943. #: You can also create shortcuts to switch to specific layouts::
  944. #: map ctrl+alt+t goto_layout tall
  945. #: map ctrl+alt+s goto_layout stack
  946. #: Similarly, to switch back to the previous layout::
  947. #: map ctrl+alt+p last_used_layout
  948. #: }}}
  949. #: Font sizes {{{
  950. #: You can change the font size for all top-level kitty OS windows at
  951. #: a time or only the current one.
  952. # map kitty_mod+equal change_font_size all +2.0
  953. # map kitty_mod+minus change_font_size all -2.0
  954. # map kitty_mod+backspace change_font_size all 0
  955. #: To setup shortcuts for specific font sizes::
  956. #: map kitty_mod+f6 change_font_size all 10.0
  957. #: To setup shortcuts to change only the current OS window's font
  958. #: size::
  959. #: map kitty_mod+f6 change_font_size current 10.0
  960. #: }}}
  961. #: Select and act on visible text {{{
  962. #: Use the hints kitten to select text and either pass it to an
  963. #: external program or insert it into the terminal or copy it to the
  964. #: clipboard.
  965. # map kitty_mod+e kitten hints
  966. #: Open a currently visible URL using the keyboard. The program used
  967. #: to open the URL is specified in open_url_with.
  968. # map kitty_mod+p>f kitten hints --type path --program -
  969. #: Select a path/filename and insert it into the terminal. Useful, for
  970. #: instance to run git commands on a filename output from a previous
  971. #: git command.
  972. # map kitty_mod+p>shift+f kitten hints --type path
  973. #: Select a path/filename and open it with the default open program.
  974. # map kitty_mod+p>l kitten hints --type line --program -
  975. #: Select a line of text and insert it into the terminal. Use for the
  976. #: output of things like: ls -1
  977. # map kitty_mod+p>w kitten hints --type word --program -
  978. #: Select words and insert into terminal.
  979. # map kitty_mod+p>h kitten hints --type hash --program -
  980. #: Select something that looks like a hash and insert it into the
  981. #: terminal. Useful with git, which uses sha1 hashes to identify
  982. #: commits
  983. # map kitty_mod+p>n kitten hints --type linenum
  984. #: Select something that looks like filename:linenum and open it in
  985. #: vim at the specified line number.
  986. # map kitty_mod+p>y kitten hints --type hyperlink
  987. #: Select a hyperlink (i.e. a URL that has been marked as such by the
  988. #: terminal program, for example, by ls --hyperlink=auto).
  989. #: The hints kitten has many more modes of operation that you can map
  990. #: to different shortcuts. For a full description see kittens/hints.
  991. #: }}}
  992. #: Miscellaneous {{{
  993. # map kitty_mod+f11 toggle_fullscreen
  994. # map kitty_mod+f10 toggle_maximized
  995. # map kitty_mod+u kitten unicode_input
  996. # map kitty_mod+f2 edit_config_file
  997. # map kitty_mod+escape kitty_shell window
  998. #: Open the kitty shell in a new window/tab/overlay/os_window to
  999. #: control kitty using commands.
  1000. # map kitty_mod+a>m set_background_opacity +0.1
  1001. # map kitty_mod+a>l set_background_opacity -0.1
  1002. # map kitty_mod+a>1 set_background_opacity 1
  1003. # map kitty_mod+a>d set_background_opacity default
  1004. # map kitty_mod+delete clear_terminal reset active
  1005. #: You can create shortcuts to clear/reset the terminal. For example::
  1006. #: # Reset the terminal
  1007. #: map kitty_mod+f9 clear_terminal reset active
  1008. #: # Clear the terminal screen by erasing all contents
  1009. #: map kitty_mod+f10 clear_terminal clear active
  1010. #: # Clear the terminal scrollback by erasing it
  1011. #: map kitty_mod+f11 clear_terminal scrollback active
  1012. #: # Scroll the contents of the screen into the scrollback
  1013. #: map kitty_mod+f12 clear_terminal scroll active
  1014. #: If you want to operate on all windows instead of just the current
  1015. #: one, use all instead of active.
  1016. #: It is also possible to remap Ctrl+L to both scroll the current
  1017. #: screen contents into the scrollback buffer and clear the screen,
  1018. #: instead of just clearing the screen, for example, for ZSH add the
  1019. #: following to ~/.zshrc:
  1020. #: .. code-block:: sh
  1021. #: scroll-and-clear-screen() {
  1022. #: printf '\n%.0s' {1..$LINES}
  1023. #: zle clear-screen
  1024. #: }
  1025. #: zle -N scroll-and-clear-screen
  1026. #: bindkey '^l' scroll-and-clear-screen
  1027. map kitty_mod+f5 load_config_file
  1028. #: Reload kitty.conf, applying any changes since the last time it was
  1029. #: loaded. Note that a handful of settings cannot be dynamically
  1030. #: changed and require a full restart of kitty. You can also map a
  1031. #: keybinding to load a different config file, for example::
  1032. #: map f5 load_config /path/to/alternative/kitty.conf
  1033. #: Note that all setting from the original kitty.conf are discarded,
  1034. #: in other words the new conf settings *replace* the old ones.
  1035. map kitty_mod+f6 debug_config
  1036. #: Show details about exactly what configuration kitty is running with
  1037. #: and its host environment. Useful for debugging issues.
  1038. #: You can tell kitty to send arbitrary (UTF-8) encoded text to the
  1039. #: client program when pressing specified shortcut keys. For example::
  1040. #: map ctrl+alt+a send_text all Special text
  1041. #: This will send "Special text" when you press the ctrl+alt+a key
  1042. #: combination. The text to be sent is a python string literal so you
  1043. #: can use escapes like \x1b to send control codes or \u21fb to send
  1044. #: unicode characters (or you can just input the unicode characters
  1045. #: directly as UTF-8 text). The first argument to send_text is the
  1046. #: keyboard modes in which to activate the shortcut. The possible
  1047. #: values are normal or application or kitty or a comma separated
  1048. #: combination of them. The special keyword all means all modes. The
  1049. #: modes normal and application refer to the DECCKM cursor key mode
  1050. #: for terminals, and kitty refers to the special kitty extended
  1051. #: keyboard protocol.
  1052. #: Another example, that outputs a word and then moves the cursor to
  1053. #: the start of the line (same as pressing the Home key)::
  1054. #: map ctrl+alt+a send_text normal Word\x1b[H
  1055. #: map ctrl+alt+a send_text application Word\x1bOH
  1056. #: }}}
  1057. # }}}