kitty.conf 52 KB

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