1 # vim:fileencoding=utf-8:ft=conf:foldmethod=marker
5 #: To list all fonts: `kitty list-fonts`
9 #: Fira has a few features see https://github.com/tonsky/FiraCode/wiki/How-to-enable-stylistic-sets
10 font_features FiraCode-Bold +ss03
11 font_features FiraCode-Light +ss03
12 font_features FiraCode-Medium +ss03
13 font_features FiraCode-Regular +ss03
14 font_features FiraCode-Retina +ss03
15 font_features FiraCode-SemiBold +ss03
17 # symbol_map U+E0A0-U+E0A3,U+E0C0-U+E0C7 PowerlineSymbols
21 #: Cursor customization {{{
23 #: One of block, beam or underline (thickness can also be configured)
25 cursor_blink_interval 0
33 #: Separate scrollback pager (MB)
34 #:TODO what is this exactly?
35 scrollback_pager_history_size 100
36 scrollback_pager less --chop-long-lines --RAW-CONTROL-CHARS +INPUT_LINE_NUMBER
44 url_prefixes http https file ftp
46 open_url_modifiers kitty_mod
49 #: coping and selection
51 strip_trailing_spaces never
52 rectangle_select_modifiers ctrl+alt
53 terminal_select_modifiers shift
54 select_by_word_characters @-./_~?&=%+#
57 focus_follows_mouse yes
59 default_pointer_shape beam
60 pointer_shape_when_grabbed arrow
61 pointer_shape_when_dragging beam
65 #: Performance tuning {{{
69 #: Delay (in milliseconds) between screen updates. Decreasing it,
70 #: increases frames-per-second (FPS) at the cost of more CPU usage.
71 #: The default value yields ~100 FPS which is more than sufficient for
72 #: most uses. Note that to actually achieve 100 FPS you have to either
73 #: set sync_to_monitor to no or use a monitor with a high refresh
74 #: rate. Also, to minimize latency when there is pending input to be
75 #: processed, repaint_delay is ignored.
79 #: Delay (in milliseconds) before input from the program running in
80 #: the terminal is processed. Note that decreasing it will increase
81 #: responsiveness, but also increase CPU usage and might cause flicker
82 #: in full screen programs that redraw the entire screen on each loop,
83 #: because kitty is so fast that partial screen updates will be drawn.
87 #: Sync screen updates to the refresh rate of the monitor. This
88 #: prevents tearing (https://en.wikipedia.org/wiki/Screen_tearing)
89 #: when scrolling. However, it limits the rendering speed to the
90 #: refresh rate of your monitor. With a very high speed mouse/high
91 #: keyboard repeat rate, you may notice some slight input latency. If
92 #: so, set this to no.
99 window_alert_on_bell yes
107 remember_window_size no
108 initial_window_width 80c
109 initial_window_height 24c
111 #: See https://sw.kovidgoyal.net/kitty/index.html#layouts.
114 resize_draw_strategy static
115 resize_debounce_time 0.00
116 placement_strategy top-left
119 confirm_os_window_close 2
125 tab_bar_style powerline
128 tab_bar_margin_width 0.0
129 tab_switch_strategy previous
131 tab_activity_symbol none
133 #: Template supporting {index}, {title}, {num_windows}, some formatting options
134 #: are also available.
135 #: See https://sw.kovidgoyal.net/kitty/conf.html#opt-kitty.tab_title_template
136 tab_title_template "{title}"
137 active_tab_title_template none
143 include colors/nord.conf
151 #: The shell program to execute. The default value of . means to use
152 #: whatever shell is set as the default shell for the current user.
153 #: Note that on macOS if you change this, you might need to add
154 #: --login to ensure that the shell starts in interactive mode and
155 #: reads its startup rc files.
159 #: The console editor to use when editing the kitty config file or
160 #: similar tasks. A value of . means to use the environment variables
161 #: VISUAL and EDITOR in that order. Note that this environment
162 #: variable has to be set not just in your shell startup scripts but
163 #: system-wide, otherwise kitty will not see it.
165 close_on_child_death no
167 #: Close the window when the child process (shell) exits. If no (the
168 #: default), the terminal will remain open when the child exits as
169 #: long as there are still processes outputting to the terminal (for
170 #: example disowned or backgrounded processes). If yes, the window
171 #: will close as soon as the child process exits. Note that setting it
172 #: to yes means that any background processes still using the terminal
173 #: can fail silently because their stdout/stderr/stdin no longer work.
175 allow_remote_control yes
177 #: Allow other programs to control kitty. If you turn this on other
178 #: programs can control all aspects of kitty, including sending text
179 #: to kitty windows, opening new windows, closing windows, reading the
180 #: content of windows, etc. Note that this even works over ssh
181 #: connections. You can chose to either allow any program running
182 #: within kitty to control it, with yes or only programs that connect
183 #: to the socket specified with the kitty --listen-on command line
184 #: option, if you use the value socket-only. The latter is useful if
185 #: you want to prevent programs running on a remote computer over ssh
186 #: from controlling kitty.
190 #: Tell kitty to listen to the specified unix/tcp socket for remote
191 #: control connections. Note that this will apply to all kitty
192 #: instances. It can be overridden by the kitty --listen-on command
193 #: line flag. This option accepts only UNIX sockets, such as
194 #: unix:${TEMP}/mykitty or (on Linux) unix:@mykitty. Environment
195 #: variables are expanded. If {kitty_pid} is present then it is
196 #: replaced by the PID of the kitty process, otherwise the PID of the
197 #: kitty process is appended to the value, with a hyphen. This option
198 #: is ignored unless you also set allow_remote_control to enable
199 #: remote control. See the help for kitty --listen-on for more
204 #: Specify environment variables to set in all child processes. Note
205 #: that environment variables are expanded recursively, so if you
209 #: env MYVAR2=${MYVAR1}/${HOME}/b
211 #: The value of MYVAR2 will be a/<path to home directory>/b.
213 update_check_interval 24
215 #: Periodically check if an update to kitty is available. If an update
216 #: is found a system notification is displayed informing you of the
217 #: available update. The default is to check every 24 hrs, set to zero
222 #: Path to a session file to use for all kitty instances. Can be
223 #: overridden by using the kitty --session command line option for
224 #: individual instances. See
225 #: https://sw.kovidgoyal.net/kitty/index.html#sessions in the kitty
226 #: documentation for details. Note that relative paths are interpreted
227 #: with respect to the kitty config directory. Environment variables
228 #: in the path are expanded.
230 clipboard_control write-clipboard write-primary
232 #: Allow programs running in kitty to read and write from the
233 #: clipboard. You can control exactly which actions are allowed. The
234 #: set of possible actions is: write-clipboard read-clipboard write-
235 #: primary read-primary. You can additionally specify no-append to
236 #: disable kitty's protocol extension for clipboard concatenation. The
237 #: default is to allow writing to the clipboard and primary selection
238 #: with concatenation enabled. Note that enabling the read
239 #: functionality is a security risk as it means that any program, even
240 #: one running on a remote server via SSH can read your clipboard.
244 #: Process hyperlink (OSC 8) escape sequences. If disabled OSC 8
245 #: escape sequences are ignored. Otherwise they become clickable
246 #: links, that you can click by holding down ctrl+shift and clicking
247 #: with the mouse. The special value of ``ask`` means that kitty will
248 #: ask before opening the link.
252 #: The value of the TERM environment variable to set. Changing this
253 #: can break many terminal programs, only change it if you know what
254 #: you are doing, not because you read some advice on Stack Overflow
255 #: to change it. The TERM variable is used by various programs to get
256 #: information about the capabilities and behavior of the terminal. If
257 #: you change it, depending on what programs you run, and how
258 #: different the terminal you are changing it to is, various things
259 #: from key-presses, to colors, to various advanced features may not
264 #: OS specific tweaks {{{
266 macos_titlebar_color system
268 #: Change the color of the kitty window's titlebar on macOS. A value
269 #: of system means to use the default system color, a value of
270 #: background means to use the background color of the currently
271 #: active window and finally you can use an arbitrary color, such as
272 #: #12af59 or red. WARNING: This option works by using a hack, as
273 #: there is no proper Cocoa API for it. It sets the background color
274 #: of the entire window and makes the titlebar transparent. As such it
275 #: is incompatible with background_opacity. If you want to use both,
276 #: you are probably better off just hiding the titlebar with
277 #: hide_window_decorations.
279 macos_option_as_alt no
281 #: Use the option key as an alt key. With this set to no, kitty will
282 #: use the macOS native Option+Key = unicode character behavior. This
283 #: will break any Alt+key keyboard shortcuts in your terminal
284 #: programs, but you can use the macOS unicode input technique. You
285 #: can use the values: left, right, or both to use only the left,
286 #: right or both Option keys as Alt, instead.
288 macos_hide_from_tasks no
290 #: Hide the kitty window from running tasks (Option+Tab) on macOS.
292 macos_quit_when_last_window_closed no
294 #: Have kitty quit when all the top-level windows are closed. By
295 #: default, kitty will stay running, even with no open windows, as is
296 #: the expected behavior on macOS.
298 macos_window_resizable yes
300 #: Disable this if you want kitty top-level (OS) windows to not be
301 #: resizable on macOS.
305 #: Draw an extra border around the font with the given width, to
306 #: increase legibility at small font sizes. For example, a value of
307 #: 0.75 will result in rendering that looks similar to sub-pixel
308 #: antialiasing at common font sizes.
310 macos_traditional_fullscreen no
312 #: Use the traditional full-screen transition, that is faster, but
315 macos_show_window_title_in all
317 #: Show or hide the window title in the macOS window or menu-bar. A
318 #: value of window will show the title of the currently active window
319 #: at the top of the macOS window. A value of menubar will show the
320 #: title of the currently active window in the macOS menu-bar, making
321 #: use of otherwise wasted space. all will show the title everywhere
322 #: and none hides the title in the window and the menu-bar.
324 macos_custom_beam_cursor no
326 #: Enable/disable custom mouse cursor for macOS that is easier to see
327 #: on both light and dark backgrounds. WARNING: this might make your
328 #: mouse cursor invisible on dual GPU machines.
330 linux_display_server auto
332 #: Choose between Wayland and X11 backends. By default, an appropriate
333 #: backend based on the system state is chosen automatically. Set it
334 #: to x11 or wayland to force the choice.
338 #: Keyboard shortcuts {{{
340 #: Keys are identified simply by their lowercase unicode characters.
341 #: For example: ``a`` for the A key, ``[`` for the left square bracket
342 #: key, etc. For functional keys, such as ``Enter or Escape`` the
343 #: names are present at https://sw.kovidgoyal.net/kitty/keyboard-
344 #: protocol.html#functional-key-definitions. For a list of modifier
345 #: names, see: GLFW mods
346 #: <https://www.glfw.org/docs/latest/group__mods.html>
348 #: On Linux you can also use XKB key names to bind keys that are not
349 #: supported by GLFW. See XKB keys
350 #: <https://github.com/xkbcommon/libxkbcommon/blob/master/xkbcommon/xkbcommon-
351 #: keysyms.h> for a list of key names. The name to use is the part
352 #: after the XKB_KEY_ prefix. Note that you can only use an XKB key
353 #: name for keys that are not known as GLFW keys.
355 #: Finally, you can use raw system key codes to map keys, again only
356 #: for keys that are not known as GLFW keys. To see the system key
357 #: code for a key, start kitty with the kitty --debug-keyboard option.
358 #: Then kitty will output some debug text for every key event. In that
359 #: text look for ``native_code`` the value of that becomes the key
360 #: name in the shortcut. For example:
362 #: .. code-block:: none
364 #: on_key_input: glfw key: 65 native_code: 0x61 action: PRESS mods: 0x0 text: 'a'
366 #: Here, the key name for the A key is 0x61 and you can use it with::
368 #: map ctrl+0x61 something
370 #: to map ctrl+a to something.
372 #: You can use the special action no_op to unmap a keyboard shortcut
373 #: that is assigned in the default configuration::
375 #: map kitty_mod+space no_op
377 #: You can combine multiple actions to be triggered by a single
378 #: shortcut, using the syntax below::
380 #: map key combine <separator> action1 <separator> action2 <separator> action3 ...
384 #: map kitty_mod+e combine : new_window : next_layout
386 #: this will create a new window and switch to the next available
389 #: You can use multi-key shortcuts using the syntax shown below::
391 #: map key1>key2>key3 action
395 #: map ctrl+f>2 set_font_size 20
399 #: The value of kitty_mod is used as the modifier for all default
400 #: shortcuts, you can change it in your kitty.conf to change the
401 #: modifiers for all the default shortcuts.
403 clear_all_shortcuts no
405 #: You can have kitty remove all shortcut definition seen up to this
406 #: point. Useful, for instance, to remove the default shortcuts.
408 # kitten_alias hints hints --hints-offset=0
410 #: You can create aliases for kitten names, this allows overriding the
411 #: defaults for kitten options and can also be used to shorten
412 #: repeated mappings of the same kitten with a specific group of
413 #: options. For example, the above alias changes the default value of
414 #: kitty +kitten hints --hints-offset to zero for all mappings,
415 #: including the builtin ones.
419 map kitty_mod+c copy_to_clipboard
421 #: There is also a copy_or_interrupt action that can be optionally
422 #: mapped to Ctrl+c. It will copy only if there is a selection and
423 #: send an interrupt otherwise. Similarly, copy_and_clear_or_interrupt
424 #: will copy and clear the selection or send an interrupt if there is
427 map kitty_mod+v paste_from_clipboard
428 map kitty_mod+s paste_from_selection
429 map shift+insert paste_from_selection
430 map kitty_mod+o pass_selection_to_program
432 #: You can also pass the contents of the current selection to any
433 #: program using pass_selection_to_program. By default, the system's
434 #: open program is used, but you can specify your own, the selection
435 #: will be passed as a command line argument to the program, for
438 #: map kitty_mod+o pass_selection_to_program firefox
440 #: You can pass the current selection to a terminal program running in
441 #: a new kitty window, by using the @selection placeholder::
443 #: map kitty_mod+y new_window less @selection
449 map kitty_mod+up scroll_line_up
450 map kitty_mod+k scroll_line_up
451 map kitty_mod+down scroll_line_down
452 map kitty_mod+j scroll_line_down
453 map kitty_mod+page_up scroll_page_up
454 map kitty_mod+page_down scroll_page_down
455 map kitty_mod+home scroll_home
456 map kitty_mod+end scroll_end
457 map kitty_mod+h show_scrollback
459 #: You can pipe the contents of the current screen + history buffer as
460 #: STDIN to an arbitrary program using the ``launch`` function. For
461 #: example, the following opens the scrollback buffer in less in an
464 #: map f1 launch --stdin-source=@screen_scrollback --stdin-add-formatting --type=overlay less +G -R
466 #: For more details on piping screen and buffer contents to external
467 #: programs, see launch.
471 #: Window management {{{
473 map kitty_mod+enter new_window
475 #: You can open a new window running an arbitrary program, for
478 #: map kitty_mod+y launch mutt
480 #: You can open a new window with the current working directory set to
481 #: the working directory of the current window using::
483 #: map ctrl+alt+enter launch --cwd=current
485 #: You can open a new window that is allowed to control kitty via the
486 #: kitty remote control facility by prefixing the command line with @.
487 #: Any programs running in that window will be allowed to control
488 #: kitty. For example::
490 #: map ctrl+enter launch --allow-remote-control some_program
492 #: You can open a new window next to the currently active window or as
493 #: the first window, with::
495 #: map ctrl+n launch --location=neighbor some_program
496 #: map ctrl+f launch --location=first some_program
498 #: For more details, see launch.
500 map kitty_mod+n new_os_window
502 #: Works like new_window above, except that it opens a top level OS
503 #: kitty window. In particular you can use new_os_window_with_cwd to
504 #: open a window with the current working directory.
506 map kitty_mod+w close_window
507 map kitty_mod+] next_window
508 map kitty_mod+[ previous_window
509 map kitty_mod+f move_window_forward
510 map kitty_mod+b move_window_backward
511 map kitty_mod+` move_window_to_top
512 map kitty_mod+r start_resizing_window
513 map kitty_mod+1 first_window
514 map kitty_mod+2 second_window
515 map kitty_mod+3 third_window
516 map kitty_mod+4 fourth_window
517 map kitty_mod+5 fifth_window
518 map kitty_mod+6 sixth_window
519 map kitty_mod+7 seventh_window
520 map kitty_mod+8 eighth_window
521 map kitty_mod+9 ninth_window
522 map kitty_mod+0 tenth_window
525 #: Tab management {{{
527 map kitty_mod+right next_tab
528 map kitty_mod+left previous_tab
529 map kitty_mod+t new_tab
530 map kitty_mod+q close_tab
531 map kitty_mod+. move_tab_forward
532 map kitty_mod+, move_tab_backward
533 map kitty_mod+alt+t set_tab_title
535 #: You can also create shortcuts to go to specific tabs, with 1 being
536 #: the first tab, 2 the second tab and -1 being the previously active
537 #: tab, and any number larger than the last tab being the last tab::
539 #: map ctrl+alt+1 goto_tab 1
540 #: map ctrl+alt+2 goto_tab 2
542 #: Just as with new_window above, you can also pass the name of
543 #: arbitrary commands to run when using new_tab and use
544 #: new_tab_with_cwd. Finally, if you want the new tab to open next to
545 #: the current tab rather than at the end of the tabs list, use::
547 #: map ctrl+t new_tab !neighbor [optional cmd to run]
550 #: Layout management {{{
552 map kitty_mod+l next_layout
554 #: You can also create shortcuts to switch to specific layouts::
556 #: map ctrl+alt+t goto_layout tall
557 #: map ctrl+alt+s goto_layout stack
559 #: Similarly, to switch back to the previous layout::
561 #: map ctrl+alt+p last_used_layout
566 #: You can change the font size for all top-level kitty OS windows at
567 #: a time or only the current one.
569 map kitty_mod+equal change_font_size all +2.0
570 map kitty_mod+plus change_font_size all +2.0
571 map kitty_mod+kp_add change_font_size all +2.0
572 map kitty_mod+minus change_font_size all -2.0
573 map kitty_mod+kp_subtract change_font_size all -2.0
574 map kitty_mod+backspace change_font_size all 0
576 #: To setup shortcuts for specific font sizes::
578 #: map kitty_mod+f6 change_font_size all 10.0
580 #: To setup shortcuts to change only the current OS window's font
583 #: map kitty_mod+f6 change_font_size current 10.0
586 #: Select and act on visible text {{{
588 #: Use the hints kitten to select text and either pass it to an
589 #: external program or insert it into the terminal or copy it to the
592 map kitty_mod+e kitten hints
594 #: Open a currently visible URL using the keyboard. The program used
595 #: to open the URL is specified in open_url_with.
597 map kitty_mod+p>f kitten hints --type path --program -
599 #: Select a path/filename and insert it into the terminal. Useful, for
600 #: instance to run git commands on a filename output from a previous
603 map kitty_mod+p>shift+f kitten hints --type path
605 #: Select a path/filename and open it with the default open program.
607 map kitty_mod+p>l kitten hints --type line --program -
609 #: Select a line of text and insert it into the terminal. Use for the
610 #: output of things like: ls -1
612 map kitty_mod+p>w kitten hints --type word --program -
614 #: Select words and insert into terminal.
616 map kitty_mod+p>h kitten hints --type hash --program -
618 #: Select something that looks like a hash and insert it into the
619 #: terminal. Useful with git, which uses sha1 hashes to identify
622 map kitty_mod+p>n kitten hints --type linenum
624 #: Select something that looks like filename:linenum and open it in
625 #: vim at the specified line number.
627 map kitty_mod+p>y kitten hints --type hyperlink
629 #: Select a hyperlink (i.e. a URL that has been marked as such by the
630 #: terminal program, for example, by ls --hyperlink=auto).
633 #: The hints kitten has many more modes of operation that you can map
634 #: to different shortcuts. For a full description see kittens/hints.
639 map kitty_mod+f11 toggle_fullscreen
640 map kitty_mod+f10 toggle_maximized
641 map kitty_mod+u kitten unicode_input
642 map kitty_mod+f2 edit_config_file
643 map kitty_mod+escape kitty_shell window
645 #: Open the kitty shell in a new window/tab/overlay/os_window to
646 #: control kitty using commands.
648 map kitty_mod+a>m set_background_opacity +0.1
649 map kitty_mod+a>l set_background_opacity -0.1
650 map kitty_mod+a>1 set_background_opacity 1
651 map kitty_mod+a>d set_background_opacity default
652 map kitty_mod+delete clear_terminal reset active
654 #: You can create shortcuts to clear/reset the terminal. For example::
656 #: # Reset the terminal
657 #: map kitty_mod+f9 clear_terminal reset active
658 #: # Clear the terminal screen by erasing all contents
659 #: map kitty_mod+f10 clear_terminal clear active
660 #: # Clear the terminal scrollback by erasing it
661 #: map kitty_mod+f11 clear_terminal scrollback active
662 #: # Scroll the contents of the screen into the scrollback
663 #: map kitty_mod+f12 clear_terminal scroll active
665 #: If you want to operate on all windows instead of just the current
666 #: one, use all instead of active.
668 #: It is also possible to remap Ctrl+L to both scroll the current
669 #: screen contents into the scrollback buffer and clear the screen,
670 #: instead of just clearing the screen::
672 #: map ctrl+l combine : clear_terminal scroll active : send_text normal,application \x0c
675 #: You can tell kitty to send arbitrary (UTF-8) encoded text to the
676 #: client program when pressing specified shortcut keys. For example::
678 #: map ctrl+alt+a send_text all Special text
680 #: This will send "Special text" when you press the ctrl+alt+a key
681 #: combination. The text to be sent is a python string literal so you
682 #: can use escapes like \x1b to send control codes or \u21fb to send
683 #: unicode characters (or you can just input the unicode characters
684 #: directly as UTF-8 text). The first argument to send_text is the
685 #: keyboard modes in which to activate the shortcut. The possible
686 #: values are normal or application or kitty or a comma separated
687 #: combination of them. The special keyword all means all modes. The
688 #: modes normal and application refer to the DECCKM cursor key mode
689 #: for terminals, and kitty refers to the special kitty extended
690 #: keyboard protocol.
692 #: Another example, that outputs a word and then moves the cursor to
693 #: the start of the line (same as pressing the Home key)::
695 #: map ctrl+alt+a send_text normal Word\x1b[H
696 #: map ctrl+alt+a send_text application Word\x1bOH