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