· 6 years ago · Nov 08, 2019, 04:30 PM
1# vim:fileencoding=utf-8:ft=conf:foldmethod=marker
2#: Fonts {{{
3
4#: kitty has very powerful font management. You can configure
5#: individual font faces and even specify special fonts for particular
6#: characters.
7
8font_family Fira Code
9bold_font auto
10italic_font auto
11bold_italic_font auto
12
13#: You can specify different fonts for the bold/italic/bold-italic
14#: variants. By default they are derived automatically, by the OSes
15#: font system. Setting them manually is useful for font families that
16#: have many weight variants like Book, Medium, Thick, etc. For
17#: example::
18
19#: font_family Operator Mono Book
20#: bold_font Operator Mono Medium
21#: italic_font Operator Mono Book Italic
22#: bold_italic_font Operator Mono Medium Italic
23
24font_size 12.0
25
26#: Font size (in pts)
27
28adjust_line_height 0
29adjust_column_width 0
30
31#: Change the size of each character cell kitty renders. You can use
32#: either numbers, which are interpreted as pixels or percentages
33#: (number followed by %), which are interpreted as percentages of the
34#: unmodified values. You can use negative pixels or percentages less
35#: than 100% to reduce sizes (but this might cause rendering
36#: artifacts).
37
38# symbol_map U+E0A0-U+E0A2,U+E0B0-U+E0B3 PowerlineSymbols
39
40#: Map the specified unicode codepoints to a particular font. Useful
41#: if you need special rendering for some symbols, such as for
42#: Powerline. Avoids the need for patched fonts. Each unicode code
43#: point is specified in the form U+<code point in hexadecimal>. You
44#: can specify multiple code points, separated by commas and ranges
45#: separated by hyphens. symbol_map itself can be specified multiple
46#: times. Syntax is::
47
48#: symbol_map codepoints Font Family Name
49
50box_drawing_scale 0.001, 1, 1.5, 2
51
52#: Change the sizes of the lines used for the box drawing unicode
53#: characters These values are in pts. They will be scaled by the
54#: monitor DPI to arrive at a pixel value. There must be four values
55#: corresponding to thin, normal, thick, and very thick lines.
56
57#: }}}
58
59#: Cursor customization {{{
60
61cursor #cccccc
62
63#: Default cursor color
64
65cursor_text_color #111111
66
67#: Choose the color of text under the cursor. If you want it rendered
68#: with the background color of the cell underneath instead, use the
69#: special keyword: background
70
71cursor_shape block
72
73#: The cursor shape can be one of (block, beam, underline)
74
75cursor_blink_interval 0.5
76cursor_stop_blinking_after 15.0
77
78#: The interval (in seconds) at which to blink the cursor. Set to zero
79#: to disable blinking. Note that numbers smaller than repaint_delay
80#: will be limited to repaint_delay. Stop blinking cursor after the
81#: specified number of seconds of keyboard inactivity. Set to zero to
82#: never stop blinking.
83
84#: }}}
85
86#: Scrollback {{{
87
88scrollback_lines 2000
89
90#: Number of lines of history to keep in memory for scrolling back.
91#: Memory is allocated on demand. Negative numbers are (effectively)
92#: infinite scrollback. Note that using very large scrollback is not
93#: recommended as it can slow down resizing of the terminal and also
94#: use large amounts of RAM.
95
96scrollback_pager less --chop-long-lines --RAW-CONTROL-CHARS +INPUT_LINE_NUMBER
97
98#: Program with which to view scrollback in a new window. The
99#: scrollback buffer is passed as STDIN to this program. If you change
100#: it, make sure the program you use can handle ANSI escape sequences
101#: for colors and text formatting. INPUT_LINE_NUMBER in the command
102#: line above will be replaced by an integer representing which line
103#: should be at the top of the screen.
104
105scrollback_pager_history_size 0
106
107#: Separate scrollback history size, used only for browsing the
108#: scrollback buffer (in MB). This separate buffer is not available
109#: for interactive scrolling but will be piped to the pager program
110#: when viewing scrollback buffer in a separate window. The current
111#: implementation stores one character in 4 bytes, so approximatively
112#: 2500 lines per megabyte at 100 chars per line. A value of zero or
113#: less disables this feature. The maximum allowed size is 4GB.
114
115wheel_scroll_multiplier 5.0
116
117#: Modify the amount scrolled by the mouse wheel. Note this is only
118#: used for low precision scrolling devices, not for high precision
119#: scrolling on platforms such as macOS and Wayland. Use negative
120#: numbers to change scroll direction.
121
122touch_scroll_multiplier 1.0
123
124#: Modify the amount scrolled by a touchpad. Note this is only used
125#: for high precision scrolling devices on platforms such as macOS and
126#: Wayland. Use negative numbers to change scroll direction.
127
128#: }}}
129
130#: Mouse {{{
131
132url_color #0087BD
133url_style curly
134
135#: The color and style for highlighting URLs on mouse-over. url_style
136#: can be one of: none, single, double, curly
137
138open_url_modifiers kitty_mod
139
140#: The modifier keys to press when clicking with the mouse on URLs to
141#: open the URL
142
143open_url_with default
144
145#: The program with which to open URLs that are clicked on. The
146#: special value default means to use the operating system's default
147#: URL handler.
148
149copy_on_select no
150
151#: Copy to clipboard on select. With this enabled, simply selecting
152#: text with the mouse will cause the text to be copied to clipboard.
153#: Useful on platforms such as macOS that do not have the concept of
154#: primary selections. Note that this is a security risk, as all
155#: programs, including websites open in your browser can read the
156#: contents of the clipboard.
157
158rectangle_select_modifiers ctrl+alt
159
160#: The modifiers to use rectangular selection (i.e. to select text in
161#: a rectangular block with the mouse)
162
163select_by_word_characters :@-./_~?&=%+#
164
165#: Characters considered part of a word when double clicking. In
166#: addition to these characters any character that is marked as an
167#: alpha-numeric character in the unicode database will be matched.
168
169click_interval -1.0
170
171#: The interval between successive clicks to detect double/triple
172#: clicks (in seconds). Negative numbers will use the system default
173#: instead, if available, or fallback to 0.5.
174
175mouse_hide_wait 3.0
176
177#: Hide mouse cursor after the specified number of seconds of the
178#: mouse not being used. Set to zero to disable mouse cursor hiding.
179
180focus_follows_mouse no
181
182#: Set the active window to the window under the mouse when moving the
183#: mouse around
184
185#: }}}
186
187#: Performance tuning {{{
188
189repaint_delay 10
190
191#: Delay (in milliseconds) between screen updates. Decreasing it,
192#: increases frames-per-second (FPS) at the cost of more CPU usage.
193#: The default value yields ~100 FPS which is more than sufficient for
194#: most uses. Note that to actually achieve 100 FPS you have to either
195#: set sync_to_monitor to no or use a monitor with a high refresh
196#: rate.
197
198input_delay 3
199
200#: Delay (in milliseconds) before input from the program running in
201#: the terminal is processed. Note that decreasing it will increase
202#: responsiveness, but also increase CPU usage and might cause flicker
203#: in full screen programs that redraw the entire screen on each loop,
204#: because kitty is so fast that partial screen updates will be drawn.
205
206sync_to_monitor yes
207
208#: Sync screen updates to the refresh rate of the monitor. This
209#: prevents tearing (https://en.wikipedia.org/wiki/Screen_tearing)
210#: when scrolling. However, it limits the rendering speed to the
211#: refresh rate of your monitor. With a very high speed mouse/high
212#: keyboard repeat rate, you may notice some slight input latency. If
213#: so, set this to no.
214
215#: }}}
216
217#: Terminal bell {{{
218
219enable_audio_bell yes
220
221#: Enable/disable the audio bell. Useful in environments that require
222#: silence.
223
224visual_bell_duration 0.0
225
226#: Visual bell duration. Flash the screen when a bell occurs for the
227#: specified number of seconds. Set to zero to disable.
228
229window_alert_on_bell yes
230
231#: Request window attention on bell. Makes the dock icon bounce on
232#: macOS or the taskbar flash on linux.
233
234bell_on_tab yes
235
236#: Show a bell symbol on the tab if a bell occurs in one of the
237#: windows in the tab and the window is not the currently focused
238#: window
239
240#: }}}
241
242#: Window layout {{{
243
244remember_window_size yes
245initial_window_width 640
246initial_window_height 400
247
248#: If enabled, the window size will be remembered so that new
249#: instances of kitty will have the same size as the previous
250#: instance. If disabled, the window will initially have size
251#: configured by initial_window_width/height, in pixels. You can use a
252#: suffix of "c" on the width/height values to have them interpreted
253#: as number of cells instead of pixels.
254
255enabled_layouts *
256
257#: The enabled window layouts. A comma separated list of layout names.
258#: The special value all means all layouts. The first listed layout
259#: will be used as the startup layout. For a list of available
260#: layouts, see the
261#: https://sw.kovidgoyal.net/kitty/index.html#layouts.
262
263window_resize_step_cells 2
264window_resize_step_lines 2
265
266#: The step size (in units of cell width/cell height) to use when
267#: resizing windows. The cells value is used for horizontal resizing
268#: and the lines value for vertical resizing.
269
270window_border_width 1.0
271
272#: The width (in pts) of window borders. Will be rounded to the
273#: nearest number of pixels based on screen resolution. Note that
274#: borders are displayed only when more than one window is visible.
275#: They are meant to separate multiple windows.
276
277draw_minimal_borders yes
278
279#: Draw only the minimum borders needed. This means that only the
280#: minimum needed borders for inactive windows are drawn. That is only
281#: the borders that separate the inactive window from a neighbor. Note
282#: that setting a non-zero window margin overrides this and causes all
283#: borders to be drawn.
284
285window_margin_width 0.0
286
287#: The window margin (in pts) (blank area outside the border)
288
289single_window_margin_width -1000.0
290
291#: The window margin (in pts) to use when only a single window is
292#: visible. Negative values will cause the value of
293#: window_margin_width to be used instead.
294
295window_padding_width 0.0
296
297#: The window padding (in pts) (blank area between the text and the
298#: window border)
299
300active_border_color #00ff00
301
302#: The color for the border of the active window
303
304inactive_border_color #cccccc
305
306#: The color for the border of inactive windows
307
308bell_border_color #ff5a00
309
310#: The color for the border of inactive windows in which a bell has
311#: occurred
312
313inactive_text_alpha 1.0
314
315#: Fade the text in inactive windows by the specified amount (a number
316#: between zero and one, with zero being fully faded).
317
318hide_window_decorations no
319
320#: Hide the window decorations (title-bar and window borders). Whether
321#: this works and exactly what effect it has depends on the window
322#: manager/operating system.
323
324#: }}}
325
326#: Tab bar {{{
327
328tab_bar_edge bottom
329
330#: Which edge to show the tab bar on, top or bottom
331
332tab_bar_margin_width 0.0
333
334#: The margin to the left and right of the tab bar (in pts)
335
336tab_bar_style fade
337
338#: The tab bar style, can be one of: fade, separator or hidden. In the
339#: fade style, each tab's edges fade into the background color, in the
340#: separator style, tabs are separated by a configurable separator.
341
342tab_fade 0.25 0.5 0.75 1
343
344#: Control how each tab fades into the background when using fade for
345#: the tab_bar_style. Each number is an alpha (between zero and one)
346#: that controls how much the corresponding cell fades into the
347#: background, with zero being no fade and one being full fade. You
348#: can change the number of cells used by adding/removing entries to
349#: this list.
350
351tab_separator " ┇"
352
353#: The separator between tabs in the tab bar when using separator as
354#: the tab_bar_style.
355
356tab_title_template {title}
357
358#: A template to render the tab title. The default just renders the
359#: title. If you wish to include the tab-index as well, use something
360#: like: {index}: {title}. Useful if you have shortcuts mapped for
361#: goto_tab N.
362
363active_tab_foreground #000
364active_tab_background #eee
365active_tab_font_style bold-italic
366inactive_tab_foreground #444
367inactive_tab_background #999
368inactive_tab_font_style normal
369
370#: Tab bar colors and styles
371
372#: }}}
373
374#: Color scheme {{{
375
376foreground #c4c5b5
377background #1a1a1a
378
379#: The foreground and background colors
380
381background_opacity 1
382dynamic_background_opacity no
383
384#: The opacity of the background. A number between 0 and 1, where 1 is
385#: opaque and 0 is fully transparent. This will only work if
386#: supported by the OS (for instance, when using a compositor under
387#: X11). Note that it only sets the default background color's
388#: opacity. This is so that things like the status bar in vim,
389#: powerline prompts, etc. still look good. But it means that if you
390#: use a color theme with a background color in your editor, it will
391#: not be rendered as transparent. Instead you should change the
392#: default background color in your kitty config and not use a
393#: background color in the editor color scheme. Or use the escape
394#: codes to set the terminals default colors in a shell script to
395#: launch your editor. Be aware that using a value less than 1.0 is a
396#: (possibly significant) performance hit. If you want to dynamically
397#: change transparency of windows set dynamic_background_opacity to
398#: yes (this is off by default as it has a performance cost)
399
400dim_opacity 0.75
401
402#: How much to dim text that has the DIM/FAINT attribute set. One
403#: means no dimming and zero means fully dimmed (i.e. invisible).
404
405selection_foreground #000000
406selection_background #FFFACD
407
408#: The foreground and background for text selected with the mouse
409
410
411#: The 16 terminal colors. There are 8 basic colors, each color has a
412#: dull and bright version. You can also set the remaining colors from
413#: the 256 color table as color16 to color255.
414
415color0 #1a1a1a
416color8 #625e4c
417
418#: black
419
420color1 #f4005f
421color9 #f4005f
422
423#: red
424
425color2 #98e024
426color10 #98e024
427
428#: green
429
430color3 #fa8419
431color11 #e0d561
432
433#: yellow
434
435color4 #9d65ff
436color12 #9d65ff
437
438#: blue
439
440color5 #4040fc
441color13 #4040fc
442
443#: magenta
444
445color6 #58d1eb
446color14 #58d1eb
447
448#: cyan
449
450color7 #c4c5b5
451color15 #f6f6ef
452
453#: white
454
455include onehalf-dark.conf
456
457#: }}}
458
459#: Advanced {{{
460
461shell .
462
463#: The shell program to execute. The default value of . means to use
464#: whatever shell is set as the default shell for the current user.
465#: Note that on macOS if you change this, you might need to add
466#: --login to ensure that the shell starts in interactive mode and
467#: reads its startup rc files.
468
469editor .
470
471#: The console editor to use when editing the kitty config file or
472#: similar tasks. A value of . means to use the environment variable
473#: EDITOR. Note that this environment variable has to be set not just
474#: in your shell startup scripts but system-wide, otherwise kitty will
475#: not see it.
476
477close_on_child_death no
478
479#: Close the window when the child process (shell) exits. If no (the
480#: default), the terminal will remain open when the child exits as
481#: long as there are still processes outputting to the terminal (for
482#: example disowned or backgrounded processes). If yes, the window
483#: will close as soon as the child process exits. Note that setting it
484#: to yes means that any background processes still using the terminal
485#: can fail silently because their stdout/stderr/stdin no longer work.
486
487allow_remote_control yes
488
489#: Allow other programs to control kitty. If you turn this on other
490#: programs can control all aspects of kitty, including sending text
491#: to kitty windows, opening new windows, closing windows, reading the
492#: content of windows, etc. Note that this even works over ssh
493#: connections.
494
495# env
496
497#: Specify environment variables to set in all child processes. Note
498#: that environment variables are expanded recursively, so if you
499#: use::
500
501#: env MYVAR1=a
502#: env MYVAR2=${MYVAR1}/${HOME}/b
503
504#: The value of MYVAR2 will be a/<path to home directory>/b.
505
506startup_session none
507
508#: Path to a session file to use for all kitty instances. Can be
509#: overridden by using the kitty --session command line option for
510#: individual instances. See
511#: https://sw.kovidgoyal.net/kitty/index.html#sessions in the kitty
512#: documentation for details. Note that relative paths are interpreted
513#: with respect to the kitty config directory. Environment variables
514#: in the path are expanded.
515
516clipboard_control write-clipboard write-primary
517
518#: Allow programs running in kitty to read and write from the
519#: clipboard. You can control exactly which actions are allowed. The
520#: set of possible actions is: write-clipboard read-clipboard write-
521#: primary read-primary The default is to allow writing to the
522#: clipboard and primary selection. Note that enabling the read
523#: functionality is a security risk as it means that any program, even
524#: one running on a remote server via SSH can read your clipboard.
525
526term xterm-kitty
527
528#: The value of the TERM environment variable to set. Changing this
529#: can break many terminal programs, only change it if you know what
530#: you are doing, not because you read some advice on Stack Overflow
531#: to change it. The TERM variable if used by various programs to get
532#: information about the capabilities and behavior of the terminal. If
533#: you change it, depending on what programs you run, and how
534#: different the terminal you are changing it to is, various things
535#: from key-presses, to colors, to various advanced features may not
536#: work.
537
538#: }}}
539
540#: OS specific tweaks {{{
541
542macos_titlebar_color system
543
544#: Change the color of the kitty window's titlebar on macOS. A value
545#: of system means to use the default system color, a value of
546#: background means to use the background color of the currently
547#: active window and finally you can use an arbitrary color, such as
548#: #12af59 or red. WARNING: This option works by using a hack, as
549#: there is no proper Cocoa API for it. It sets the background color
550#: of the entire window and makes the titlebar transparent. As such it
551#: is incompatible with background_opacity. If you want to use both,
552#: you are probably better off just hiding the titlebar with
553#: hide_window_decorations.
554
555macos_option_as_alt yes
556
557#: Use the option key as an alt key. With this set to no, kitty will
558#: use the macOS native Option+Key = unicode character behavior. This
559#: will break any Alt+key keyboard shortcuts in your terminal
560#: programs, but you can use the macOS unicode input technique.
561
562macos_hide_from_tasks no
563
564#: Hide the kitty window from running tasks (Option+Tab) on macOS.
565
566macos_quit_when_last_window_closed no
567
568#: Have kitty quit when all the top-level windows are closed. By
569#: default, kitty will stay running, even with no open windows, as is
570#: the expected behavior on macOS.
571
572macos_window_resizable yes
573
574#: Disable this if you want kitty top-level (OS) windows to not be
575#: resizable on macOS.
576
577macos_thicken_font 0
578
579#: Draw an extra border around the font with the given width, to
580#: increase legibility at small font sizes. For example, a value of
581#: 0.75 will result in rendering that looks similar to sub-pixel
582#: antialiasing at common font sizes.
583
584macos_traditional_fullscreen no
585
586#: Use the traditional full-screen transition, that is faster, but
587#: less pretty.
588
589macos_custom_beam_cursor no
590
591#: Enable/disable custom mouse cursor for macOS that is easier to see
592#: on both light and dark backgrounds. WARNING: this might make your
593#: mouse cursor invisible on dual GPU machines.
594
595#: }}}
596
597#: Keyboard shortcuts {{{
598
599#: For a list of key names, see: GLFW keys
600#: <http://www.glfw.org/docs/latest/group__keys.html>. The name to use
601#: is the part after the GLFW_KEY_ prefix. For a list of modifier
602#: names, see: GLFW mods
603#: <http://www.glfw.org/docs/latest/group__mods.html>
604
605#: On Linux you can also use XKB key names to bind keys that are not
606#: supported by GLFW. See XKB keys
607#: <https://github.com/xkbcommon/libxkbcommon/blob/master/xkbcommon/xkbcommon-
608#: keysyms.h> for a list of key names. The name to use is the part
609#: after the XKB_KEY_ prefix. Note that you should only use an XKB key
610#: name for keys that are not present in the list of GLFW keys.
611
612#: Finally, you can use raw system key codes to map keys. To see the
613#: system key code for a key, start kitty with the kitty --debug-
614#: keyboard option. Then kitty will output some debug text for every
615#: key event. In that text look for ``native_code`` the value of that
616#: becomes the key name in the shortcut. For example:
617
618#: .. code-block:: none
619
620#: on_key_input: glfw key: 65 native_code: 0x61 action: PRESS mods: 0x0 text: 'a'
621
622#: Here, the key name for the A key is 0x61 and you can use it with::
623
624#: map ctrl+0x61 something
625
626#: to map ctrl+a to something.
627
628#: You can use the special action no_op to unmap a keyboard shortcut
629#: that is assigned in the default configuration.
630
631#: You can combine multiple actions to be triggered by a single
632#: shortcut, using the syntax below::
633
634#: map key combine <separator> action1 <separator> action2 <separator> action3 ...
635
636#: For example::
637
638#: map kitty_mod+e combine : new_window : next_layout
639
640#: this will create a new window and switch to the next available
641#: layout
642
643#: You can use multi-key shortcuts using the syntax shown below::
644
645#: map key1>key2>key3 action
646
647#: For example::
648
649#: map ctrl+f>2 set_font_size 20
650
651kitty_mod ctrl+shift
652
653#: The value of kitty_mod is used as the modifier for all default
654#: shortcuts, you can change it in your kitty.conf to change the
655#: modifiers for all the default shortcuts.
656
657clear_all_shortcuts no
658
659#: You can have kitty remove all shortcut definition seen up to this
660#: point. Useful, for instance, to remove the default shortcuts.
661
662#: Clipboard {{{
663
664map kitty_mod+c copy_to_clipboard
665
666#: There is also a copy_or_interrupt action that can be optionally
667#: mapped to Ctrl+c. It will copy only if there is a selection and
668#: send an interrupt otherwise.
669
670map kitty_mod+v paste_from_clipboard
671map kitty_mod+s paste_from_selection
672map shift+insert paste_from_selection
673map kitty_mod+o pass_selection_to_program
674
675#: You can also pass the contents of the current selection to any
676#: program using pass_selection_to_program. By default, the system's
677#: open program is used, but you can specify your own, for example::
678
679#: map kitty_mod+o pass_selection_to_program firefox
680
681#: You can pass the current selection to a terminal program running in
682#: a new kitty window, by using the @selection placeholder::
683
684#: map kitty_mod+y new_window less @selection
685
686#: }}}
687
688#: Scrolling {{{
689
690map kitty_mod+up scroll_line_up
691map kitty_mod+k scroll_line_up
692map kitty_mod+down scroll_line_down
693map kitty_mod+j scroll_line_down
694map kitty_mod+page_up scroll_page_up
695map kitty_mod+page_down scroll_page_down
696map kitty_mod+home scroll_home
697map kitty_mod+end scroll_end
698map kitty_mod+h show_scrollback
699
700#: You can pipe the contents of the current screen + history buffer as
701#: STDIN to an arbitrary program using the ``pipe`` function. For
702#: example, the following opens the scrollback buffer in less in an
703#: overlay window::
704
705#: map f1 pipe @ansi overlay less +G -R
706
707#: For more details on piping screen and buffer contents to external
708#: programs, see pipe.
709
710#: }}}
711
712#: Window management {{{
713
714map kitty_mod+enter new_window
715
716#: You can open a new window running an arbitrary program, for
717#: example::
718
719#: map kitty_mod+y new_window mutt
720
721#: You can open a new window with the current working directory set to
722#: the working directory of the current window using::
723
724#: map ctrl+alt+enter new_window_with_cwd
725
726#: You can open a new window that is allowed to control kitty via the
727#: kitty remote control facility by prefixing the command line with @.
728#: Any programs running in that window will be allowed to control
729#: kitty. For example::
730
731#: map ctrl+enter new_window @ some_program
732
733map kitty_mod+n new_os_window
734map kitty_mod+w close_window
735map kitty_mod+] next_window
736map kitty_mod+[ previous_window
737map kitty_mod+f move_window_forward
738map kitty_mod+b move_window_backward
739map kitty_mod+` move_window_to_top
740map kitty_mod+r start_resizing_window
741map kitty_mod+1 first_window
742map kitty_mod+2 second_window
743map kitty_mod+3 third_window
744map kitty_mod+4 fourth_window
745map kitty_mod+5 fifth_window
746map kitty_mod+6 sixth_window
747map kitty_mod+7 seventh_window
748map kitty_mod+8 eighth_window
749map kitty_mod+9 ninth_window
750map kitty_mod+0 tenth_window
751#: }}}
752
753#: Tab management {{{
754
755map kitty_mod+right next_tab
756map kitty_mod+left previous_tab
757map kitty_mod+t new_tab
758map kitty_mod+q close_tab
759map kitty_mod+. move_tab_forward
760map kitty_mod+, move_tab_backward
761map kitty_mod+alt+t set_tab_title
762
763#: You can also create shortcuts to go to specific tabs, with 1 being
764#: the first tab, 2 the second tab and -1 being the previously active
765#: tab::
766
767#: map ctrl+alt+1 goto_tab 1
768#: map ctrl+alt+2 goto_tab 2
769
770#: Just as with new_window above, you can also pass the name of
771#: arbitrary commands to run when using new_tab and use
772#: new_tab_with_cwd. Finally, if you want the new tab to open next to
773#: the current tab rather than at the end of the tabs list, use::
774
775#: map ctrl+t new_tab !neighbor [optional cmd to run]
776#: }}}
777
778#: Layout management {{{
779
780map kitty_mod+l next_layout
781
782#: You can also create shortcuts to switch to specific layouts::
783
784#: map ctrl+alt+t goto_layout tall
785#: map ctrl+alt+s goto_layout stack
786
787#: Similarly, to switch back to the previous layout::
788
789#: map ctrl+alt+p last_used_layout
790#: }}}
791
792#: Font sizes {{{
793
794#: You can change the font size for all top-level kitty OS windows at
795#: a time or only the current one.
796
797map kitty_mod+equal change_font_size all +2.0
798map kitty_mod+minus change_font_size all -2.0
799map kitty_mod+backspace change_font_size all 0
800
801#: To setup shortcuts for specific font sizes::
802
803#: map kitty_mod+f6 change_font_size all 10.0
804
805#: To setup shortcuts to change only the current OS window's font
806#: size::
807
808#: map kitty_mod+f6 change_font_size current 10.0
809#: }}}
810
811#: Select and act on visible text {{{
812
813#: Use the hints kitten to select text and either pass it to an
814#: external program or insert it into the terminal or copy it to the
815#: clipboard.
816
817map kitty_mod+e kitten hints
818
819#: Open a currently visible URL using the keyboard. The program used
820#: to open the URL is specified in open_url_with.
821
822map kitty_mod+p>f kitten hints --type path --program -
823
824#: Select a path/filename and insert it into the terminal. Useful, for
825#: instance to run git commands on a filename output from a previous
826#: git command.
827
828map kitty_mod+p>shift+f kitten hints --type path
829
830#: Select a path/filename and open it with the default open program.
831
832map kitty_mod+p>l kitten hints --type line --program -
833
834#: Select a line of text and insert it into the terminal. Use for the
835#: output of things like: ls -1
836
837map kitty_mod+p>w kitten hints --type word --program -
838
839#: Select words and insert into terminal.
840
841map kitty_mod+p>h kitten hints --type hash --program -
842
843#: Select something that looks like a hash and insert it into the
844#: terminal. Useful with git, which uses sha1 hashes to identify
845#: commits
846
847
848#: The hints kitten has many more modes of operation that you can map
849#: to different shortcuts. For a full description see kittens/hints.
850#: }}}
851
852#: Miscellaneous {{{
853
854map kitty_mod+f11 toggle_fullscreen
855map kitty_mod+u kitten unicode_input
856map kitty_mod+f2 edit_config_file
857map kitty_mod+escape kitty_shell window
858
859#: Open the kitty shell in a new window/tab/overlay/os_window to
860#: control kitty using commands.
861
862map kitty_mod+a>m set_background_opacity +0.1
863map kitty_mod+a>l set_background_opacity -0.1
864map kitty_mod+a>1 set_background_opacity 1
865map kitty_mod+a>d set_background_opacity default
866map kitty_mod+delete clear_terminal reset active
867
868#: You can create shortcuts to clear/reset the terminal. For example::
869
870#: # Reset the terminal
871#: map kitty_mod+f9 clear_terminal reset active
872#: # Clear the terminal screen by erasing all contents
873#: map kitty_mod+f10 clear_terminal clear active
874#: # Clear the terminal scrollback by erasing it
875#: map kitty_mod+f11 clear_terminal scrollback active
876#: # Scroll the contents of the screen into the scrollback
877#: map kitty_mod+f12 clear_terminal scroll active
878
879#: If you want to operate on all windows instead of just the current
880#: one, use all instead of :italic`active`.
881
882#: It is also possible to remap Ctrl+L to both scroll the current
883#: screen contents into the scrollback buffer and clear the screen,
884#: instead of just clearing the screen::
885
886#: map ctrl+l combine : clear_terminal scroll active : send_text normal,application
887
888
889#: You can tell kitty to send arbitrary (UTF-8) encoded text to the
890#: client program when pressing specified shortcut keys. For example::
891
892#: map ctrl+alt+a send_text all Special text
893
894#: This will send "Special text" when you press the ctrl+alt+a key
895#: combination. The text to be sent is a python string literal so you
896#: can use escapes like \x1b to send control codes or \u21fb to send
897#: unicode characters (or you can just input the unicode characters
898#: directly as UTF-8 text). The first argument to send_text is the
899#: keyboard modes in which to activate the shortcut. The possible
900#: values are normal or application or kitty or a comma separated
901#: combination of them. The special keyword all means all modes. The
902#: modes normal and application refer to the DECCKM cursor key mode
903#: for terminals, and kitty refers to the special kitty extended
904#: keyboard protocol.
905
906#: Another example, that outputs a word and then moves the cursor to
907#: the start of the line (same as pressing the Home key)::
908
909#: map ctrl+alt+a send_text normal Word\x1b[H
910#: map ctrl+alt+a send_text application Word\x1bOH
911
912#: }}}
913
914# }}}