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