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 #: Keyboard shortcuts {{{
266 #: Keys are identified simply by their lowercase unicode characters.
267 #: For example: ``a`` for the A key, ``[`` for the left square bracket
268 #: key, etc. For functional keys, such as ``Enter or Escape`` the
269 #: names are present at https://sw.kovidgoyal.net/kitty/keyboard-
270 #: protocol.html#functional-key-definitions. For a list of modifier
271 #: names, see: GLFW mods
272 #: <https://www.glfw.org/docs/latest/group__mods.html>
274 #: On Linux you can also use XKB key names to bind keys that are not
275 #: supported by GLFW. See XKB keys
276 #: <https://github.com/xkbcommon/libxkbcommon/blob/master/xkbcommon/xkbcommon-
277 #: keysyms.h> for a list of key names. The name to use is the part
278 #: after the XKB_KEY_ prefix. Note that you can only use an XKB key
279 #: name for keys that are not known as GLFW keys.
281 #: Finally, you can use raw system key codes to map keys, again only
282 #: for keys that are not known as GLFW keys. To see the system key
283 #: code for a key, start kitty with the kitty --debug-keyboard option.
284 #: Then kitty will output some debug text for every key event. In that
285 #: text look for ``native_code`` the value of that becomes the key
286 #: name in the shortcut. For example:
288 #: .. code-block:: none
290 #: on_key_input: glfw key: 65 native_code: 0x61 action: PRESS mods: 0x0 text: 'a'
292 #: Here, the key name for the A key is 0x61 and you can use it with::
294 #: map ctrl+0x61 something
296 #: to map ctrl+a to something.
298 #: You can use the special action no_op to unmap a keyboard shortcut
299 #: that is assigned in the default configuration::
301 #: map kitty_mod+space no_op
303 #: You can combine multiple actions to be triggered by a single
304 #: shortcut, using the syntax below::
306 #: map key combine <separator> action1 <separator> action2 <separator> action3 ...
310 #: map kitty_mod+e combine : new_window : next_layout
312 #: this will create a new window and switch to the next available
315 #: You can use multi-key shortcuts using the syntax shown below::
317 #: map key1>key2>key3 action
321 #: map ctrl+f>2 set_font_size 20
325 #: The value of kitty_mod is used as the modifier for all default
326 #: shortcuts, you can change it in your kitty.conf to change the
327 #: modifiers for all the default shortcuts.
329 clear_all_shortcuts no
331 #: You can have kitty remove all shortcut definition seen up to this
332 #: point. Useful, for instance, to remove the default shortcuts.
334 kitten_alias hints hints --hints-offset=0 --alphabet="asonetuhid'l,r.cpgyf;zqvjwkmxb"
336 #: You can create aliases for kitten names, this allows overriding the
337 #: defaults for kitten options and can also be used to shorten
338 #: repeated mappings of the same kitten with a specific group of
339 #: options. For example, the above alias changes the default value of
340 #: kitty +kitten hints --hints-offset to zero for all mappings,
341 #: including the builtin ones.
345 map kitty_mod+c copy_to_clipboard
347 #: There is also a copy_or_interrupt action that can be optionally
348 #: mapped to Ctrl+c. It will copy only if there is a selection and
349 #: send an interrupt otherwise. Similarly, copy_and_clear_or_interrupt
350 #: will copy and clear the selection or send an interrupt if there is
353 map kitty_mod+v paste_from_clipboard
354 map kitty_mod+s paste_from_selection
355 map shift+insert paste_from_selection
356 map kitty_mod+o pass_selection_to_program
358 #: You can also pass the contents of the current selection to any
359 #: program using pass_selection_to_program. By default, the system's
360 #: open program is used, but you can specify your own, the selection
361 #: will be passed as a command line argument to the program, for
364 #: map kitty_mod+o pass_selection_to_program firefox
366 #: You can pass the current selection to a terminal program running in
367 #: a new kitty window, by using the @selection placeholder::
369 #: map kitty_mod+y new_window less @selection
375 map kitty_mod+up scroll_line_up
376 map kitty_mod+k scroll_line_up
377 map kitty_mod+down scroll_line_down
378 map kitty_mod+j scroll_line_down
379 map kitty_mod+page_up scroll_page_up
380 map shift+page_up scroll_page_up
381 map kitty_mod+page_down scroll_page_down
382 map shift+page_down scroll_page_down
383 map kitty_mod+home scroll_home
384 map kitty_mod+end scroll_end
385 map kitty_mod+h show_scrollback
387 #: You can pipe the contents of the current screen + history buffer as
388 #: STDIN to an arbitrary program using the ``launch`` function. For
389 #: example, the following opens the scrollback buffer in less in an
392 #: map f1 launch --stdin-source=@screen_scrollback --stdin-add-formatting --type=overlay less +G -R
394 #: For more details on piping screen and buffer contents to external
395 #: programs, see launch.
399 #: Window management {{{
401 map kitty_mod+enter new_window
403 #: You can open a new window running an arbitrary program, for
406 #: map kitty_mod+y launch mutt
408 #: You can open a new window with the current working directory set to
409 #: the working directory of the current window using::
411 #: map ctrl+alt+enter launch --cwd=current
413 #: You can open a new window that is allowed to control kitty via the
414 #: kitty remote control facility by prefixing the command line with @.
415 #: Any programs running in that window will be allowed to control
416 #: kitty. For example::
418 #: map ctrl+enter launch --allow-remote-control some_program
420 #: You can open a new window next to the currently active window or as
421 #: the first window, with::
423 #: map ctrl+n launch --location=neighbor some_program
424 #: map ctrl+f launch --location=first some_program
426 #: For more details, see launch.
428 map kitty_mod+n new_os_window
430 #: Works like new_window above, except that it opens a top level OS
431 #: kitty window. In particular you can use new_os_window_with_cwd to
432 #: open a window with the current working directory.
434 map kitty_mod+w close_window
435 map kitty_mod+] next_window
436 map kitty_mod+[ previous_window
437 # map kitty_mod+f move_window_forward
438 map kitty_mod+b move_window_backward
439 map kitty_mod+` move_window_to_top
440 map kitty_mod+r start_resizing_window
441 map kitty_mod+1 first_window
442 map kitty_mod+2 second_window
443 map kitty_mod+3 third_window
444 map kitty_mod+4 fourth_window
445 map kitty_mod+5 fifth_window
446 map kitty_mod+6 sixth_window
447 map kitty_mod+7 seventh_window
448 map kitty_mod+8 eighth_window
449 map kitty_mod+9 ninth_window
450 map kitty_mod+0 tenth_window
453 #: Tab management {{{
455 map kitty_mod+right next_tab
456 map kitty_mod+left previous_tab
457 map kitty_mod+t new_tab
458 map kitty_mod+q close_tab
459 map kitty_mod+. move_tab_forward
460 map kitty_mod+, move_tab_backward
461 map kitty_mod+alt+t set_tab_title
463 #: You can also create shortcuts to go to specific tabs, with 1 being
464 #: the first tab, 2 the second tab and -1 being the previously active
465 #: tab, and any number larger than the last tab being the last tab::
467 #: map ctrl+alt+1 goto_tab 1
468 #: map ctrl+alt+2 goto_tab 2
470 #: Just as with new_window above, you can also pass the name of
471 #: arbitrary commands to run when using new_tab and use
472 #: new_tab_with_cwd. Finally, if you want the new tab to open next to
473 #: the current tab rather than at the end of the tabs list, use::
475 #: map ctrl+t new_tab !neighbor [optional cmd to run]
478 #: Layout management {{{
480 map kitty_mod+l next_layout
482 #: You can also create shortcuts to switch to specific layouts::
484 #: map ctrl+alt+t goto_layout tall
485 #: map ctrl+alt+s goto_layout stack
487 #: Similarly, to switch back to the previous layout::
489 #: map ctrl+alt+p last_used_layout
494 #: You can change the font size for all top-level kitty OS windows at
495 #: a time or only the current one.
497 map kitty_mod+equal change_font_size all +2.0
498 map kitty_mod+plus change_font_size all +2.0
499 map kitty_mod+kp_add change_font_size all +2.0
500 map kitty_mod+minus change_font_size all -2.0
501 map kitty_mod+kp_subtract change_font_size all -2.0
502 map kitty_mod+backspace change_font_size all 0
504 #: To setup shortcuts for specific font sizes::
506 #: map kitty_mod+f6 change_font_size all 10.0
508 #: To setup shortcuts to change only the current OS window's font
511 #: map kitty_mod+f6 change_font_size current 10.0
514 #: Select and act on visible text {{{
516 #: Use the hints kitten to select text and either pass it to an
517 #: external program or insert it into the terminal or copy it to the
520 map kitty_mod+f kitten hints
522 #: Open a currently visible URL using the keyboard. The program used
523 #: to open the URL is specified in open_url_with.
525 map kitty_mod+p>f kitten hints --type path --program -
527 #: Select a path/filename and insert it into the terminal. Useful, for
528 #: instance to run git commands on a filename output from a previous
531 map kitty_mod+p>shift+f kitten hints --type path
533 #: Select a path/filename and open it with the default open program.
535 map kitty_mod+p>l kitten hints --type line --program -
537 #: Select a line of text and insert it into the terminal. Use for the
538 #: output of things like: ls -1
540 map kitty_mod+p>w kitten hints --type word --program -
542 #: Select words and insert into terminal.
544 map kitty_mod+p>h kitten hints --type hash --program -
546 #: Select something that looks like a hash and insert it into the
547 #: terminal. Useful with git, which uses sha1 hashes to identify
550 map kitty_mod+p>n kitten hints --type linenum
552 #: Select something that looks like filename:linenum and open it in
553 #: vim at the specified line number.
555 map kitty_mod+p>y kitten hints --type hyperlink
557 #: Select a hyperlink (i.e. a URL that has been marked as such by the
558 #: terminal program, for example, by ls --hyperlink=auto).
561 #: The hints kitten has many more modes of operation that you can map
562 #: to different shortcuts. For a full description see kittens/hints.
567 map kitty_mod+f11 toggle_fullscreen
568 map kitty_mod+f10 toggle_maximized
569 map kitty_mod+u kitten unicode_input
570 map kitty_mod+f2 edit_config_file
571 map kitty_mod+escape kitty_shell window
573 #: Open the kitty shell in a new window/tab/overlay/os_window to
574 #: control kitty using commands.
576 map kitty_mod+a>m set_background_opacity +0.1
577 map kitty_mod+a>l set_background_opacity -0.1
578 map kitty_mod+a>1 set_background_opacity 1
579 map kitty_mod+a>d set_background_opacity default
580 map kitty_mod+delete clear_terminal reset active
582 #: You can create shortcuts to clear/reset the terminal. For example::
584 #: # Reset the terminal
585 #: map kitty_mod+f9 clear_terminal reset active
586 #: # Clear the terminal screen by erasing all contents
587 #: map kitty_mod+f10 clear_terminal clear active
588 #: # Clear the terminal scrollback by erasing it
589 #: map kitty_mod+f11 clear_terminal scrollback active
590 #: # Scroll the contents of the screen into the scrollback
591 #: map kitty_mod+f12 clear_terminal scroll active
593 #: If you want to operate on all windows instead of just the current
594 #: one, use all instead of active.
596 #: It is also possible to remap Ctrl+L to both scroll the current
597 #: screen contents into the scrollback buffer and clear the screen,
598 #: instead of just clearing the screen::
600 #: map ctrl+l combine : clear_terminal scroll active : send_text normal,application \x0c
603 #: You can tell kitty to send arbitrary (UTF-8) encoded text to the
604 #: client program when pressing specified shortcut keys. For example::
606 #: map ctrl+alt+a send_text all Special text
608 #: This will send "Special text" when you press the ctrl+alt+a key
609 #: combination. The text to be sent is a python string literal so you
610 #: can use escapes like \x1b to send control codes or \u21fb to send
611 #: unicode characters (or you can just input the unicode characters
612 #: directly as UTF-8 text). The first argument to send_text is the
613 #: keyboard modes in which to activate the shortcut. The possible
614 #: values are normal or application or kitty or a comma separated
615 #: combination of them. The special keyword all means all modes. The
616 #: modes normal and application refer to the DECCKM cursor key mode
617 #: for terminals, and kitty refers to the special kitty extended
618 #: keyboard protocol.
620 #: Another example, that outputs a word and then moves the cursor to
621 #: the start of the line (same as pressing the Home key)::
623 #: map ctrl+alt+a send_text normal Word\x1b[H
624 #: map ctrl+alt+a send_text application Word\x1bOH