kitty.conf 52 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477
  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 monospace
  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 11.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. term xterm-kitty
  695. #: The value of the TERM environment variable to set. Changing this
  696. #: can break many terminal programs, only change it if you know what
  697. #: you are doing, not because you read some advice on Stack Overflow
  698. #: to change it. The TERM variable is used by various programs to get
  699. #: information about the capabilities and behavior of the terminal. If
  700. #: you change it, depending on what programs you run, and how
  701. #: different the terminal you are changing it to is, various things
  702. #: from key-presses, to colors, to various advanced features may not
  703. #: work. Changing this option by reloading the config will only affect
  704. #: newly created windows.
  705. #: }}}
  706. #: OS specific tweaks {{{
  707. wayland_titlebar_color system
  708. #: Change the color of the kitty window's titlebar on Wayland systems
  709. #: with client side window decorations such as GNOME. A value of
  710. #: system means to use the default system color, a value of background
  711. #: means to use the background color of the currently active window
  712. #: and finally you can use an arbitrary color, such as #12af59 or red.
  713. macos_titlebar_color system
  714. #: Change the color of the kitty window's titlebar on macOS. A value
  715. #: of system means to use the default system color, a value of
  716. #: background means to use the background color of the currently
  717. #: active window and finally you can use an arbitrary color, such as
  718. #: #12af59 or red. WARNING: This option works by using a hack, as
  719. #: there is no proper Cocoa API for it. It sets the background color
  720. #: of the entire window and makes the titlebar transparent. As such it
  721. #: is incompatible with background_opacity. If you want to use both,
  722. #: you are probably better off just hiding the titlebar with
  723. #: hide_window_decorations.
  724. macos_option_as_alt left
  725. #: Use the option key as an alt key. With this set to no, kitty will
  726. #: use the macOS native Option+Key = unicode character behavior. This
  727. #: will break any Alt+key keyboard shortcuts in your terminal
  728. #: programs, but you can use the macOS unicode input technique. You
  729. #: can use the values: left, right, or both to use only the left,
  730. #: right or both Option keys as Alt, instead. Changing this setting by
  731. #: reloading the config is not supported.
  732. macos_hide_from_tasks no
  733. #: Hide the kitty window from running tasks (⌘+Tab) on macOS. Changing
  734. #: this setting by reloading the config is not supported.
  735. macos_quit_when_last_window_closed no
  736. #: Have kitty quit when all the top-level windows are closed. By
  737. #: default, kitty will stay running, even with no open windows, as is
  738. #: the expected behavior on macOS.
  739. macos_window_resizable yes
  740. #: Disable this if you want kitty top-level (OS) windows to not be
  741. #: resizable on macOS. Changing this setting by reloading the config
  742. #: will only affect newly created windows.
  743. macos_thicken_font 0
  744. #: Draw an extra border around the font with the given width, to
  745. #: increase legibility at small font sizes. For example, a value of
  746. #: 0.75 will result in rendering that looks similar to sub-pixel
  747. #: antialiasing at common font sizes.
  748. macos_traditional_fullscreen no
  749. #: Use the traditional full-screen transition, that is faster, but
  750. #: less pretty.
  751. macos_show_window_title_in all
  752. #: Show or hide the window title in the macOS window or menu-bar. A
  753. #: value of window will show the title of the currently active window
  754. #: at the top of the macOS window. A value of menubar will show the
  755. #: title of the currently active window in the macOS menu-bar, making
  756. #: use of otherwise wasted space. all will show the title everywhere
  757. #: and none hides the title in the window and the menu-bar.
  758. macos_custom_beam_cursor no
  759. #: Enable/disable custom mouse cursor for macOS that is easier to see
  760. #: on both light and dark backgrounds. WARNING: this might make your
  761. #: mouse cursor invisible on dual GPU machines. Changing this setting
  762. #: by reloading the config is not supported.
  763. linux_display_server auto
  764. #: Choose between Wayland and X11 backends. By default, an appropriate
  765. #: backend based on the system state is chosen automatically. Set it
  766. #: to x11 or wayland to force the choice. Changing this setting by
  767. #: reloading the config is not supported.
  768. #: }}}
  769. #: Keyboard shortcuts {{{
  770. #: Keys are identified simply by their lowercase unicode characters.
  771. #: For example: ``a`` for the A key, ``[`` for the left square bracket
  772. #: key, etc. For functional keys, such as ``Enter or Escape`` the
  773. #: names are present at https://sw.kovidgoyal.net/kitty/keyboard-
  774. #: protocol.html#functional-key-definitions. For a list of modifier
  775. #: names, see: GLFW mods
  776. #: <https://www.glfw.org/docs/latest/group__mods.html>
  777. #: On Linux you can also use XKB key names to bind keys that are not
  778. #: supported by GLFW. See XKB keys
  779. #: <https://github.com/xkbcommon/libxkbcommon/blob/master/xkbcommon/xkbcommon-
  780. #: keysyms.h> for a list of key names. The name to use is the part
  781. #: after the XKB_KEY_ prefix. Note that you can only use an XKB key
  782. #: name for keys that are not known as GLFW keys.
  783. #: Finally, you can use raw system key codes to map keys, again only
  784. #: for keys that are not known as GLFW keys. To see the system key
  785. #: code for a key, start kitty with the kitty --debug-input option.
  786. #: Then kitty will output some debug text for every key event. In that
  787. #: text look for ``native_code`` the value of that becomes the key
  788. #: name in the shortcut. For example:
  789. #: .. code-block:: none
  790. #: on_key_input: glfw key: 65 native_code: 0x61 action: PRESS mods: 0x0 text: 'a'
  791. #: Here, the key name for the A key is 0x61 and you can use it with::
  792. #: map ctrl+0x61 something
  793. #: to map ctrl+a to something.
  794. #: You can use the special action no_op to unmap a keyboard shortcut
  795. #: that is assigned in the default configuration::
  796. #: map kitty_mod+space no_op
  797. #: You can combine multiple actions to be triggered by a single
  798. #: shortcut, using the syntax below::
  799. #: map key combine <separator> action1 <separator> action2 <separator> action3 ...
  800. #: For example::
  801. #: map kitty_mod+e combine : new_window : next_layout
  802. #: this will create a new window and switch to the next available
  803. #: layout
  804. #: You can use multi-key shortcuts using the syntax shown below::
  805. #: map key1>key2>key3 action
  806. #: For example::
  807. #: map ctrl+f>2 set_font_size 20
  808. kitty_mod super
  809. #: The value of kitty_mod is used as the modifier for all default
  810. #: shortcuts, you can change it in your kitty.conf to change the
  811. #: modifiers for all the default shortcuts.
  812. clear_all_shortcuts no
  813. #: You can have kitty remove all shortcut definition seen up to this
  814. #: point. Useful, for instance, to remove the default shortcuts.
  815. # kitten_alias hints hints --hints-offset=0
  816. #: You can create aliases for kitten names, this allows overriding the
  817. #: defaults for kitten options and can also be used to shorten
  818. #: repeated mappings of the same kitten with a specific group of
  819. #: options. For example, the above alias changes the default value of
  820. #: kitty +kitten hints --hints-offset to zero for all mappings,
  821. #: including the builtin ones.
  822. #: Clipboard {{{
  823. # map kitty_mod+c copy_to_clipboard
  824. map ctrl+shift+c copy_to_clipboard
  825. #: There is also a copy_or_interrupt action that can be optionally
  826. #: mapped to Ctrl+c. It will copy only if there is a selection and
  827. #: send an interrupt otherwise. Similarly, copy_and_clear_or_interrupt
  828. #: will copy and clear the selection or send an interrupt if there is
  829. #: no selection.
  830. # map kitty_mod+v paste_from_clipboard
  831. map ctrl+shift+v paste_from_clipboard
  832. # map kitty_mod+s paste_from_selection
  833. # map shift+insert paste_from_selection
  834. # map kitty_mod+o pass_selection_to_program
  835. #: You can also pass the contents of the current selection to any
  836. #: program using pass_selection_to_program. By default, the system's
  837. #: open program is used, but you can specify your own, the selection
  838. #: will be passed as a command line argument to the program, for
  839. #: example::
  840. #: map kitty_mod+o pass_selection_to_program firefox
  841. #: You can pass the current selection to a terminal program running in
  842. #: a new kitty window, by using the @selection placeholder::
  843. #: map kitty_mod+y new_window less @selection
  844. #: }}}
  845. #: Scrolling {{{
  846. # map kitty_mod+up scroll_line_up
  847. # map kitty_mod+k scroll_line_up
  848. # map kitty_mod+down scroll_line_down
  849. # map kitty_mod+j scroll_line_down
  850. # map kitty_mod+page_up scroll_page_up
  851. # map kitty_mod+page_down scroll_page_down
  852. # map kitty_mod+home scroll_home
  853. # map kitty_mod+end scroll_end
  854. map shift+page_up scroll_page_up
  855. map shift+page_down scroll_page_down
  856. map shift+home scroll_home
  857. map shift+end scroll_end
  858. # map kitty_mod+h show_scrollback
  859. map kitty_mod+shift+h show_scrollback
  860. #: You can pipe the contents of the current screen + history buffer as
  861. #: STDIN to an arbitrary program using the ``launch`` function. For
  862. #: example, the following opens the scrollback buffer in less in an
  863. #: overlay window::
  864. #: map f1 launch --stdin-source=@screen_scrollback --stdin-add-formatting --type=overlay less +G -R
  865. #: For more details on piping screen and buffer contents to external
  866. #: programs, see launch.
  867. #: }}}
  868. #: Window management {{{
  869. # map kitty_mod+enter new_window
  870. map kitty_mod+shift+enter new_window
  871. #: You can open a new window running an arbitrary program, for
  872. #: example::
  873. #: map kitty_mod+y launch mutt
  874. #: You can open a new window with the current working directory set to
  875. #: the working directory of the current window using::
  876. #: map ctrl+alt+enter launch --cwd=current
  877. #: You can open a new window that is allowed to control kitty via the
  878. #: kitty remote control facility by prefixing the command line with @.
  879. #: Any programs running in that window will be allowed to control
  880. #: kitty. For example::
  881. #: map ctrl+enter launch --allow-remote-control some_program
  882. #: You can open a new window next to the currently active window or as
  883. #: the first window, with::
  884. #: map ctrl+n launch --location=neighbor some_program
  885. #: map ctrl+f launch --location=first some_program
  886. #: For more details, see launch.
  887. # map kitty_mod+n new_os_window
  888. #: Works like new_window above, except that it opens a top level OS
  889. #: kitty window. In particular you can use new_os_window_with_cwd to
  890. #: open a window with the current working directory.
  891. # map kitty_mod+w close_window
  892. # map kitty_mod+] next_window
  893. # map kitty_mod+[ previous_window
  894. # map kitty_mod+f move_window_forward
  895. # map kitty_mod+b move_window_backward
  896. # map kitty_mod+` move_window_to_top
  897. # map kitty_mod+r start_resizing_window
  898. # map kitty_mod+1 first_window
  899. # map kitty_mod+2 second_window
  900. # map kitty_mod+3 third_window
  901. # map kitty_mod+4 fourth_window
  902. # map kitty_mod+5 fifth_window
  903. # map kitty_mod+6 sixth_window
  904. # map kitty_mod+7 seventh_window
  905. # map kitty_mod+8 eighth_window
  906. # map kitty_mod+9 ninth_window
  907. # map kitty_mod+0 tenth_window
  908. map kitty_mod+shift+j move_window_forward
  909. map kitty_mod+shift+k move_window_backward
  910. map kitty_mod+h neighboring_window left
  911. map kitty_mod+j neighboring_window down
  912. map kitty_mod+k neighboring_window up
  913. map kitty_mod+l neighboring_window right
  914. #: }}}
  915. #: Tab management {{{
  916. # map kitty_mod+right next_tab
  917. # map kitty_mod+left previous_tab
  918. # map kitty_mod+t new_tab
  919. # map kitty_mod+q close_tab
  920. # map kitty_mod+. move_tab_forward
  921. # map kitty_mod+, move_tab_backward
  922. # map kitty_mod+alt+t set_tab_title
  923. #: You can also create shortcuts to go to specific tabs, with 1 being
  924. #: the first tab, 2 the second tab and -1 being the previously active
  925. #: tab, and any number larger than the last tab being the last tab::
  926. #: map ctrl+alt+1 goto_tab 1
  927. #: map ctrl+alt+2 goto_tab 2
  928. #: Just as with new_window above, you can also pass the name of
  929. #: arbitrary commands to run when using new_tab and use
  930. #: new_tab_with_cwd. Finally, if you want the new tab to open next to
  931. #: the current tab rather than at the end of the tabs list, use::
  932. #: map ctrl+t new_tab !neighbor [optional cmd to run]
  933. #: }}}
  934. #: Layout management {{{
  935. map kitty_mod+enter next_layout
  936. # map kitty_mod+l next_layout
  937. #: You can also create shortcuts to switch to specific layouts::
  938. #: map ctrl+alt+t goto_layout tall
  939. #: map ctrl+alt+s goto_layout stack
  940. #: Similarly, to switch back to the previous layout::
  941. #: map ctrl+alt+p last_used_layout
  942. #: }}}
  943. #: Font sizes {{{
  944. #: You can change the font size for all top-level kitty OS windows at
  945. #: a time or only the current one.
  946. # map kitty_mod+equal change_font_size all +2.0
  947. # map kitty_mod+minus change_font_size all -2.0
  948. # map kitty_mod+backspace change_font_size all 0
  949. #: To setup shortcuts for specific font sizes::
  950. #: map kitty_mod+f6 change_font_size all 10.0
  951. #: To setup shortcuts to change only the current OS window's font
  952. #: size::
  953. #: map kitty_mod+f6 change_font_size current 10.0
  954. #: }}}
  955. #: Select and act on visible text {{{
  956. #: Use the hints kitten to select text and either pass it to an
  957. #: external program or insert it into the terminal or copy it to the
  958. #: clipboard.
  959. # map kitty_mod+e kitten hints
  960. #: Open a currently visible URL using the keyboard. The program used
  961. #: to open the URL is specified in open_url_with.
  962. # map kitty_mod+p>f kitten hints --type path --program -
  963. #: Select a path/filename and insert it into the terminal. Useful, for
  964. #: instance to run git commands on a filename output from a previous
  965. #: git command.
  966. # map kitty_mod+p>shift+f kitten hints --type path
  967. #: Select a path/filename and open it with the default open program.
  968. # map kitty_mod+p>l kitten hints --type line --program -
  969. #: Select a line of text and insert it into the terminal. Use for the
  970. #: output of things like: ls -1
  971. # map kitty_mod+p>w kitten hints --type word --program -
  972. #: Select words and insert into terminal.
  973. # map kitty_mod+p>h kitten hints --type hash --program -
  974. #: Select something that looks like a hash and insert it into the
  975. #: terminal. Useful with git, which uses sha1 hashes to identify
  976. #: commits
  977. # map kitty_mod+p>n kitten hints --type linenum
  978. #: Select something that looks like filename:linenum and open it in
  979. #: vim at the specified line number.
  980. # map kitty_mod+p>y kitten hints --type hyperlink
  981. #: Select a hyperlink (i.e. a URL that has been marked as such by the
  982. #: terminal program, for example, by ls --hyperlink=auto).
  983. #: The hints kitten has many more modes of operation that you can map
  984. #: to different shortcuts. For a full description see kittens/hints.
  985. #: }}}
  986. #: Miscellaneous {{{
  987. # map kitty_mod+f11 toggle_fullscreen
  988. # map kitty_mod+f10 toggle_maximized
  989. # map kitty_mod+u kitten unicode_input
  990. # map kitty_mod+f2 edit_config_file
  991. # map kitty_mod+escape kitty_shell window
  992. #: Open the kitty shell in a new window/tab/overlay/os_window to
  993. #: control kitty using commands.
  994. # map kitty_mod+a>m set_background_opacity +0.1
  995. # map kitty_mod+a>l set_background_opacity -0.1
  996. # map kitty_mod+a>1 set_background_opacity 1
  997. # map kitty_mod+a>d set_background_opacity default
  998. # map kitty_mod+delete clear_terminal reset active
  999. #: You can create shortcuts to clear/reset the terminal. For example::
  1000. #: # Reset the terminal
  1001. #: map kitty_mod+f9 clear_terminal reset active
  1002. #: # Clear the terminal screen by erasing all contents
  1003. #: map kitty_mod+f10 clear_terminal clear active
  1004. #: # Clear the terminal scrollback by erasing it
  1005. #: map kitty_mod+f11 clear_terminal scrollback active
  1006. #: # Scroll the contents of the screen into the scrollback
  1007. #: map kitty_mod+f12 clear_terminal scroll active
  1008. #: If you want to operate on all windows instead of just the current
  1009. #: one, use all instead of active.
  1010. #: It is also possible to remap Ctrl+L to both scroll the current
  1011. #: screen contents into the scrollback buffer and clear the screen,
  1012. #: instead of just clearing the screen, for example, for ZSH add the
  1013. #: following to ~/.zshrc:
  1014. #: .. code-block:: sh
  1015. #: scroll-and-clear-screen() {
  1016. #: printf '\n%.0s' {1..$LINES}
  1017. #: zle clear-screen
  1018. #: }
  1019. #: zle -N scroll-and-clear-screen
  1020. #: bindkey '^l' scroll-and-clear-screen
  1021. map kitty_mod+f5 load_config_file
  1022. #: Reload kitty.conf, applying any changes since the last time it was
  1023. #: loaded. Note that a handful of settings cannot be dynamically
  1024. #: changed and require a full restart of kitty. You can also map a
  1025. #: keybinding to load a different config file, for example::
  1026. #: map f5 load_config /path/to/alternative/kitty.conf
  1027. #: Note that all setting from the original kitty.conf are discarded,
  1028. #: in other words the new conf settings *replace* the old ones.
  1029. map kitty_mod+f6 debug_config
  1030. #: Show details about exactly what configuration kitty is running with
  1031. #: and its host environment. Useful for debugging issues.
  1032. #: You can tell kitty to send arbitrary (UTF-8) encoded text to the
  1033. #: client program when pressing specified shortcut keys. For example::
  1034. #: map ctrl+alt+a send_text all Special text
  1035. #: This will send "Special text" when you press the ctrl+alt+a key
  1036. #: combination. The text to be sent is a python string literal so you
  1037. #: can use escapes like \x1b to send control codes or \u21fb to send
  1038. #: unicode characters (or you can just input the unicode characters
  1039. #: directly as UTF-8 text). The first argument to send_text is the
  1040. #: keyboard modes in which to activate the shortcut. The possible
  1041. #: values are normal or application or kitty or a comma separated
  1042. #: combination of them. The special keyword all means all modes. The
  1043. #: modes normal and application refer to the DECCKM cursor key mode
  1044. #: for terminals, and kitty refers to the special kitty extended
  1045. #: keyboard protocol.
  1046. #: Another example, that outputs a word and then moves the cursor to
  1047. #: the start of the line (same as pressing the Home key)::
  1048. #: map ctrl+alt+a send_text normal Word\x1b[H
  1049. #: map ctrl+alt+a send_text application Word\x1bOH
  1050. #: }}}
  1051. # }}}