]> git.rmz.io Git - dotfiles.git/blob - kitty/kitty.conf
picom: replace compton with picom
[dotfiles.git] / kitty / kitty.conf
1 # vim:fileencoding=utf-8:ft=conf:foldmethod=marker
2
3 #: Fonts {{{
4
5 #: To list all fonts: `kitty list-fonts`
6 font_family Fira Code
7 font_size 11.0
8
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
16
17 # symbol_map U+E0A0-U+E0A3,U+E0C0-U+E0C7 PowerlineSymbols
18
19 #: }}}
20
21 #: Cursor customization {{{
22
23 #: One of block, beam or underline (thickness can also be configured)
24 cursor_shape block
25 cursor_blink_interval 0
26
27 #: }}}
28
29 #: Scrollback {{{
30
31 scrollback_lines 2000
32
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
37
38 #: }}}
39
40 #: Mouse {{{
41
42 #: URLs
43 detect_urls yes
44 url_prefixes http https file ftp
45 open_url_with default
46 open_url_modifiers kitty_mod
47 url_style curly
48
49 #: coping and selection
50 copy_on_select no
51 strip_trailing_spaces never
52 rectangle_select_modifiers ctrl+alt
53 terminal_select_modifiers shift
54 select_by_word_characters @-./_~?&=%+#
55 click_interval 0.5
56
57 focus_follows_mouse yes
58
59 default_pointer_shape beam
60 pointer_shape_when_grabbed arrow
61 pointer_shape_when_dragging beam
62
63 #: }}}
64
65 #: Performance tuning {{{
66
67 repaint_delay 10
68
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.
76
77 input_delay 3
78
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.
84
85 sync_to_monitor yes
86
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.
93
94 #: }}}
95
96 #: Terminal bell {{{
97
98 enable_audio_bell no
99 window_alert_on_bell yes
100 bell_on_tab yes
101 command_on_bell none
102
103 #: }}}
104
105 #: Window layout {{{
106
107 remember_window_size no
108 initial_window_width 80c
109 initial_window_height 24c
110
111 #: See https://sw.kovidgoyal.net/kitty/index.html#layouts.
112 enabled_layouts *
113
114 resize_draw_strategy static
115 resize_debounce_time 0.00
116 placement_strategy top-left
117 resize_in_steps no
118
119 confirm_os_window_close 2
120
121 #: }}}
122
123 #: Tab bar {{{
124
125 tab_bar_style powerline
126 tab_bar_edge bottom
127 tab_bar_min_tabs 2
128 tab_bar_margin_width 0.0
129 tab_switch_strategy previous
130
131 tab_activity_symbol none
132
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
138
139 #: }}}
140
141 #: Color scheme {{{
142
143 foreground #dddddd
144 background #000000
145
146 #: The foreground and background colors
147
148 background_opacity 1.0
149
150 #: The opacity of the background. A number between 0 and 1, where 1 is
151 #: opaque and 0 is fully transparent. This will only work if
152 #: supported by the OS (for instance, when using a compositor under
153 #: X11). Note that it only sets the background color's opacity in
154 #: cells that have the same background color as the default terminal
155 #: background. This is so that things like the status bar in vim,
156 #: powerline prompts, etc. still look good. But it means that if you
157 #: use a color theme with a background color in your editor, it will
158 #: not be rendered as transparent. Instead you should change the
159 #: default background color in your kitty config and not use a
160 #: background color in the editor color scheme. Or use the escape
161 #: codes to set the terminals default colors in a shell script to
162 #: launch your editor. Be aware that using a value less than 1.0 is a
163 #: (possibly significant) performance hit. If you want to dynamically
164 #: change transparency of windows set dynamic_background_opacity to
165 #: yes (this is off by default as it has a performance cost)
166
167 background_image none
168
169 #: Path to a background image. Must be in PNG format.
170
171 background_image_layout tiled
172
173 #: Whether to tile or scale the background image.
174
175 background_image_linear no
176
177 #: When background image is scaled, whether linear interpolation
178 #: should be used.
179
180 dynamic_background_opacity no
181
182 #: Allow changing of the background_opacity dynamically, using either
183 #: keyboard shortcuts (increase_background_opacity and
184 #: decrease_background_opacity) or the remote control facility.
185
186 background_tint 0.0
187
188 #: How much to tint the background image by the background color. The
189 #: tint is applied only under the text area, not margin/borders. Makes
190 #: it easier to read the text. Tinting is done using the current
191 #: background color for each window. This setting applies only if
192 #: background_opacity is set and transparent windows are supported or
193 #: background_image is set.
194
195 dim_opacity 0.75
196
197 #: How much to dim text that has the DIM/FAINT attribute set. One
198 #: means no dimming and zero means fully dimmed (i.e. invisible).
199
200 selection_foreground #000000
201
202 #: The foreground for text selected with the mouse. A value of none
203 #: means to leave the color unchanged.
204
205 selection_background #fffacd
206
207 #: The background for text selected with the mouse.
208
209
210 #: The 256 terminal colors. There are 8 basic colors, each color has a
211 #: dull and bright version, for the first 16 colors. You can set the
212 #: remaining 240 colors as color16 to color255.
213
214 color0 #000000
215 color8 #767676
216
217 #: black
218
219 color1 #cc0403
220 color9 #f2201f
221
222 #: red
223
224 color2 #19cb00
225 color10 #23fd00
226
227 #: green
228
229 color3 #cecb00
230 color11 #fffd00
231
232 #: yellow
233
234 color4 #0d73cc
235 color12 #1a8fff
236
237 #: blue
238
239 color5 #cb1ed1
240 color13 #fd28ff
241
242 #: magenta
243
244 color6 #0dcdcd
245 color14 #14ffff
246
247 #: cyan
248
249 color7 #dddddd
250 color15 #ffffff
251
252 #: white
253
254 mark1_foreground black
255
256 #: Color for marks of type 1
257
258 mark1_background #98d3cb
259
260 #: Color for marks of type 1 (light steel blue)
261
262 mark2_foreground black
263
264 #: Color for marks of type 2
265
266 mark2_background #f2dcd3
267
268 #: Color for marks of type 1 (beige)
269
270 mark3_foreground black
271
272 #: Color for marks of type 3
273
274 mark3_background #f274bc
275
276 #: Color for marks of type 1 (violet)
277
278 #: }}}
279
280 #: Advanced {{{
281
282 shell .
283
284 #: The shell program to execute. The default value of . means to use
285 #: whatever shell is set as the default shell for the current user.
286 #: Note that on macOS if you change this, you might need to add
287 #: --login to ensure that the shell starts in interactive mode and
288 #: reads its startup rc files.
289
290 editor .
291
292 #: The console editor to use when editing the kitty config file or
293 #: similar tasks. A value of . means to use the environment variables
294 #: VISUAL and EDITOR in that order. Note that this environment
295 #: variable has to be set not just in your shell startup scripts but
296 #: system-wide, otherwise kitty will not see it.
297
298 close_on_child_death no
299
300 #: Close the window when the child process (shell) exits. If no (the
301 #: default), the terminal will remain open when the child exits as
302 #: long as there are still processes outputting to the terminal (for
303 #: example disowned or backgrounded processes). If yes, the window
304 #: will close as soon as the child process exits. Note that setting it
305 #: to yes means that any background processes still using the terminal
306 #: can fail silently because their stdout/stderr/stdin no longer work.
307
308 allow_remote_control yes
309
310 #: Allow other programs to control kitty. If you turn this on other
311 #: programs can control all aspects of kitty, including sending text
312 #: to kitty windows, opening new windows, closing windows, reading the
313 #: content of windows, etc. Note that this even works over ssh
314 #: connections. You can chose to either allow any program running
315 #: within kitty to control it, with yes or only programs that connect
316 #: to the socket specified with the kitty --listen-on command line
317 #: option, if you use the value socket-only. The latter is useful if
318 #: you want to prevent programs running on a remote computer over ssh
319 #: from controlling kitty.
320
321 listen_on none
322
323 #: Tell kitty to listen to the specified unix/tcp socket for remote
324 #: control connections. Note that this will apply to all kitty
325 #: instances. It can be overridden by the kitty --listen-on command
326 #: line flag. This option accepts only UNIX sockets, such as
327 #: unix:${TEMP}/mykitty or (on Linux) unix:@mykitty. Environment
328 #: variables are expanded. If {kitty_pid} is present then it is
329 #: replaced by the PID of the kitty process, otherwise the PID of the
330 #: kitty process is appended to the value, with a hyphen. This option
331 #: is ignored unless you also set allow_remote_control to enable
332 #: remote control. See the help for kitty --listen-on for more
333 #: details.
334
335 # env
336
337 #: Specify environment variables to set in all child processes. Note
338 #: that environment variables are expanded recursively, so if you
339 #: use::
340
341 #: env MYVAR1=a
342 #: env MYVAR2=${MYVAR1}/${HOME}/b
343
344 #: The value of MYVAR2 will be a/<path to home directory>/b.
345
346 update_check_interval 24
347
348 #: Periodically check if an update to kitty is available. If an update
349 #: is found a system notification is displayed informing you of the
350 #: available update. The default is to check every 24 hrs, set to zero
351 #: to disable.
352
353 startup_session none
354
355 #: Path to a session file to use for all kitty instances. Can be
356 #: overridden by using the kitty --session command line option for
357 #: individual instances. See
358 #: https://sw.kovidgoyal.net/kitty/index.html#sessions in the kitty
359 #: documentation for details. Note that relative paths are interpreted
360 #: with respect to the kitty config directory. Environment variables
361 #: in the path are expanded.
362
363 clipboard_control write-clipboard write-primary
364
365 #: Allow programs running in kitty to read and write from the
366 #: clipboard. You can control exactly which actions are allowed. The
367 #: set of possible actions is: write-clipboard read-clipboard write-
368 #: primary read-primary. You can additionally specify no-append to
369 #: disable kitty's protocol extension for clipboard concatenation. The
370 #: default is to allow writing to the clipboard and primary selection
371 #: with concatenation enabled. Note that enabling the read
372 #: functionality is a security risk as it means that any program, even
373 #: one running on a remote server via SSH can read your clipboard.
374
375 allow_hyperlinks yes
376
377 #: Process hyperlink (OSC 8) escape sequences. If disabled OSC 8
378 #: escape sequences are ignored. Otherwise they become clickable
379 #: links, that you can click by holding down ctrl+shift and clicking
380 #: with the mouse. The special value of ``ask`` means that kitty will
381 #: ask before opening the link.
382
383 term xterm-kitty
384
385 #: The value of the TERM environment variable to set. Changing this
386 #: can break many terminal programs, only change it if you know what
387 #: you are doing, not because you read some advice on Stack Overflow
388 #: to change it. The TERM variable is used by various programs to get
389 #: information about the capabilities and behavior of the terminal. If
390 #: you change it, depending on what programs you run, and how
391 #: different the terminal you are changing it to is, various things
392 #: from key-presses, to colors, to various advanced features may not
393 #: work.
394
395 #: }}}
396
397 #: OS specific tweaks {{{
398
399 macos_titlebar_color system
400
401 #: Change the color of the kitty window's titlebar on macOS. A value
402 #: of system means to use the default system color, a value of
403 #: background means to use the background color of the currently
404 #: active window and finally you can use an arbitrary color, such as
405 #: #12af59 or red. WARNING: This option works by using a hack, as
406 #: there is no proper Cocoa API for it. It sets the background color
407 #: of the entire window and makes the titlebar transparent. As such it
408 #: is incompatible with background_opacity. If you want to use both,
409 #: you are probably better off just hiding the titlebar with
410 #: hide_window_decorations.
411
412 macos_option_as_alt no
413
414 #: Use the option key as an alt key. With this set to no, kitty will
415 #: use the macOS native Option+Key = unicode character behavior. This
416 #: will break any Alt+key keyboard shortcuts in your terminal
417 #: programs, but you can use the macOS unicode input technique. You
418 #: can use the values: left, right, or both to use only the left,
419 #: right or both Option keys as Alt, instead.
420
421 macos_hide_from_tasks no
422
423 #: Hide the kitty window from running tasks (Option+Tab) on macOS.
424
425 macos_quit_when_last_window_closed no
426
427 #: Have kitty quit when all the top-level windows are closed. By
428 #: default, kitty will stay running, even with no open windows, as is
429 #: the expected behavior on macOS.
430
431 macos_window_resizable yes
432
433 #: Disable this if you want kitty top-level (OS) windows to not be
434 #: resizable on macOS.
435
436 macos_thicken_font 0
437
438 #: Draw an extra border around the font with the given width, to
439 #: increase legibility at small font sizes. For example, a value of
440 #: 0.75 will result in rendering that looks similar to sub-pixel
441 #: antialiasing at common font sizes.
442
443 macos_traditional_fullscreen no
444
445 #: Use the traditional full-screen transition, that is faster, but
446 #: less pretty.
447
448 macos_show_window_title_in all
449
450 #: Show or hide the window title in the macOS window or menu-bar. A
451 #: value of window will show the title of the currently active window
452 #: at the top of the macOS window. A value of menubar will show the
453 #: title of the currently active window in the macOS menu-bar, making
454 #: use of otherwise wasted space. all will show the title everywhere
455 #: and none hides the title in the window and the menu-bar.
456
457 macos_custom_beam_cursor no
458
459 #: Enable/disable custom mouse cursor for macOS that is easier to see
460 #: on both light and dark backgrounds. WARNING: this might make your
461 #: mouse cursor invisible on dual GPU machines.
462
463 linux_display_server auto
464
465 #: Choose between Wayland and X11 backends. By default, an appropriate
466 #: backend based on the system state is chosen automatically. Set it
467 #: to x11 or wayland to force the choice.
468
469 #: }}}
470
471 #: Keyboard shortcuts {{{
472
473 #: Keys are identified simply by their lowercase unicode characters.
474 #: For example: ``a`` for the A key, ``[`` for the left square bracket
475 #: key, etc. For functional keys, such as ``Enter or Escape`` the
476 #: names are present at https://sw.kovidgoyal.net/kitty/keyboard-
477 #: protocol.html#functional-key-definitions. For a list of modifier
478 #: names, see: GLFW mods
479 #: <https://www.glfw.org/docs/latest/group__mods.html>
480
481 #: On Linux you can also use XKB key names to bind keys that are not
482 #: supported by GLFW. See XKB keys
483 #: <https://github.com/xkbcommon/libxkbcommon/blob/master/xkbcommon/xkbcommon-
484 #: keysyms.h> for a list of key names. The name to use is the part
485 #: after the XKB_KEY_ prefix. Note that you can only use an XKB key
486 #: name for keys that are not known as GLFW keys.
487
488 #: Finally, you can use raw system key codes to map keys, again only
489 #: for keys that are not known as GLFW keys. To see the system key
490 #: code for a key, start kitty with the kitty --debug-keyboard option.
491 #: Then kitty will output some debug text for every key event. In that
492 #: text look for ``native_code`` the value of that becomes the key
493 #: name in the shortcut. For example:
494
495 #: .. code-block:: none
496
497 #: on_key_input: glfw key: 65 native_code: 0x61 action: PRESS mods: 0x0 text: 'a'
498
499 #: Here, the key name for the A key is 0x61 and you can use it with::
500
501 #: map ctrl+0x61 something
502
503 #: to map ctrl+a to something.
504
505 #: You can use the special action no_op to unmap a keyboard shortcut
506 #: that is assigned in the default configuration::
507
508 #: map kitty_mod+space no_op
509
510 #: You can combine multiple actions to be triggered by a single
511 #: shortcut, using the syntax below::
512
513 #: map key combine <separator> action1 <separator> action2 <separator> action3 ...
514
515 #: For example::
516
517 #: map kitty_mod+e combine : new_window : next_layout
518
519 #: this will create a new window and switch to the next available
520 #: layout
521
522 #: You can use multi-key shortcuts using the syntax shown below::
523
524 #: map key1>key2>key3 action
525
526 #: For example::
527
528 #: map ctrl+f>2 set_font_size 20
529
530 kitty_mod ctrl+shift
531
532 #: The value of kitty_mod is used as the modifier for all default
533 #: shortcuts, you can change it in your kitty.conf to change the
534 #: modifiers for all the default shortcuts.
535
536 clear_all_shortcuts no
537
538 #: You can have kitty remove all shortcut definition seen up to this
539 #: point. Useful, for instance, to remove the default shortcuts.
540
541 # kitten_alias hints hints --hints-offset=0
542
543 #: You can create aliases for kitten names, this allows overriding the
544 #: defaults for kitten options and can also be used to shorten
545 #: repeated mappings of the same kitten with a specific group of
546 #: options. For example, the above alias changes the default value of
547 #: kitty +kitten hints --hints-offset to zero for all mappings,
548 #: including the builtin ones.
549
550 #: Clipboard {{{
551
552 map kitty_mod+c copy_to_clipboard
553
554 #: There is also a copy_or_interrupt action that can be optionally
555 #: mapped to Ctrl+c. It will copy only if there is a selection and
556 #: send an interrupt otherwise. Similarly, copy_and_clear_or_interrupt
557 #: will copy and clear the selection or send an interrupt if there is
558 #: no selection.
559
560 map kitty_mod+v paste_from_clipboard
561 map kitty_mod+s paste_from_selection
562 map shift+insert paste_from_selection
563 map kitty_mod+o pass_selection_to_program
564
565 #: You can also pass the contents of the current selection to any
566 #: program using pass_selection_to_program. By default, the system's
567 #: open program is used, but you can specify your own, the selection
568 #: will be passed as a command line argument to the program, for
569 #: example::
570
571 #: map kitty_mod+o pass_selection_to_program firefox
572
573 #: You can pass the current selection to a terminal program running in
574 #: a new kitty window, by using the @selection placeholder::
575
576 #: map kitty_mod+y new_window less @selection
577
578 #: }}}
579
580 #: Scrolling {{{
581
582 map kitty_mod+up scroll_line_up
583 map kitty_mod+k scroll_line_up
584 map kitty_mod+down scroll_line_down
585 map kitty_mod+j scroll_line_down
586 map kitty_mod+page_up scroll_page_up
587 map kitty_mod+page_down scroll_page_down
588 map kitty_mod+home scroll_home
589 map kitty_mod+end scroll_end
590 map kitty_mod+h show_scrollback
591
592 #: You can pipe the contents of the current screen + history buffer as
593 #: STDIN to an arbitrary program using the ``launch`` function. For
594 #: example, the following opens the scrollback buffer in less in an
595 #: overlay window::
596
597 #: map f1 launch --stdin-source=@screen_scrollback --stdin-add-formatting --type=overlay less +G -R
598
599 #: For more details on piping screen and buffer contents to external
600 #: programs, see launch.
601
602 #: }}}
603
604 #: Window management {{{
605
606 map kitty_mod+enter new_window
607
608 #: You can open a new window running an arbitrary program, for
609 #: example::
610
611 #: map kitty_mod+y launch mutt
612
613 #: You can open a new window with the current working directory set to
614 #: the working directory of the current window using::
615
616 #: map ctrl+alt+enter launch --cwd=current
617
618 #: You can open a new window that is allowed to control kitty via the
619 #: kitty remote control facility by prefixing the command line with @.
620 #: Any programs running in that window will be allowed to control
621 #: kitty. For example::
622
623 #: map ctrl+enter launch --allow-remote-control some_program
624
625 #: You can open a new window next to the currently active window or as
626 #: the first window, with::
627
628 #: map ctrl+n launch --location=neighbor some_program
629 #: map ctrl+f launch --location=first some_program
630
631 #: For more details, see launch.
632
633 map kitty_mod+n new_os_window
634
635 #: Works like new_window above, except that it opens a top level OS
636 #: kitty window. In particular you can use new_os_window_with_cwd to
637 #: open a window with the current working directory.
638
639 map kitty_mod+w close_window
640 map kitty_mod+] next_window
641 map kitty_mod+[ previous_window
642 map kitty_mod+f move_window_forward
643 map kitty_mod+b move_window_backward
644 map kitty_mod+` move_window_to_top
645 map kitty_mod+r start_resizing_window
646 map kitty_mod+1 first_window
647 map kitty_mod+2 second_window
648 map kitty_mod+3 third_window
649 map kitty_mod+4 fourth_window
650 map kitty_mod+5 fifth_window
651 map kitty_mod+6 sixth_window
652 map kitty_mod+7 seventh_window
653 map kitty_mod+8 eighth_window
654 map kitty_mod+9 ninth_window
655 map kitty_mod+0 tenth_window
656 #: }}}
657
658 #: Tab management {{{
659
660 map kitty_mod+right next_tab
661 map kitty_mod+left previous_tab
662 map kitty_mod+t new_tab
663 map kitty_mod+q close_tab
664 map kitty_mod+. move_tab_forward
665 map kitty_mod+, move_tab_backward
666 map kitty_mod+alt+t set_tab_title
667
668 #: You can also create shortcuts to go to specific tabs, with 1 being
669 #: the first tab, 2 the second tab and -1 being the previously active
670 #: tab, and any number larger than the last tab being the last tab::
671
672 #: map ctrl+alt+1 goto_tab 1
673 #: map ctrl+alt+2 goto_tab 2
674
675 #: Just as with new_window above, you can also pass the name of
676 #: arbitrary commands to run when using new_tab and use
677 #: new_tab_with_cwd. Finally, if you want the new tab to open next to
678 #: the current tab rather than at the end of the tabs list, use::
679
680 #: map ctrl+t new_tab !neighbor [optional cmd to run]
681 #: }}}
682
683 #: Layout management {{{
684
685 map kitty_mod+l next_layout
686
687 #: You can also create shortcuts to switch to specific layouts::
688
689 #: map ctrl+alt+t goto_layout tall
690 #: map ctrl+alt+s goto_layout stack
691
692 #: Similarly, to switch back to the previous layout::
693
694 #: map ctrl+alt+p last_used_layout
695 #: }}}
696
697 #: Font sizes {{{
698
699 #: You can change the font size for all top-level kitty OS windows at
700 #: a time or only the current one.
701
702 map kitty_mod+equal change_font_size all +2.0
703 map kitty_mod+plus change_font_size all +2.0
704 map kitty_mod+kp_add change_font_size all +2.0
705 map kitty_mod+minus change_font_size all -2.0
706 map kitty_mod+kp_subtract change_font_size all -2.0
707 map kitty_mod+backspace change_font_size all 0
708
709 #: To setup shortcuts for specific font sizes::
710
711 #: map kitty_mod+f6 change_font_size all 10.0
712
713 #: To setup shortcuts to change only the current OS window's font
714 #: size::
715
716 #: map kitty_mod+f6 change_font_size current 10.0
717 #: }}}
718
719 #: Select and act on visible text {{{
720
721 #: Use the hints kitten to select text and either pass it to an
722 #: external program or insert it into the terminal or copy it to the
723 #: clipboard.
724
725 map kitty_mod+e kitten hints
726
727 #: Open a currently visible URL using the keyboard. The program used
728 #: to open the URL is specified in open_url_with.
729
730 map kitty_mod+p>f kitten hints --type path --program -
731
732 #: Select a path/filename and insert it into the terminal. Useful, for
733 #: instance to run git commands on a filename output from a previous
734 #: git command.
735
736 map kitty_mod+p>shift+f kitten hints --type path
737
738 #: Select a path/filename and open it with the default open program.
739
740 map kitty_mod+p>l kitten hints --type line --program -
741
742 #: Select a line of text and insert it into the terminal. Use for the
743 #: output of things like: ls -1
744
745 map kitty_mod+p>w kitten hints --type word --program -
746
747 #: Select words and insert into terminal.
748
749 map kitty_mod+p>h kitten hints --type hash --program -
750
751 #: Select something that looks like a hash and insert it into the
752 #: terminal. Useful with git, which uses sha1 hashes to identify
753 #: commits
754
755 map kitty_mod+p>n kitten hints --type linenum
756
757 #: Select something that looks like filename:linenum and open it in
758 #: vim at the specified line number.
759
760 map kitty_mod+p>y kitten hints --type hyperlink
761
762 #: Select a hyperlink (i.e. a URL that has been marked as such by the
763 #: terminal program, for example, by ls --hyperlink=auto).
764
765
766 #: The hints kitten has many more modes of operation that you can map
767 #: to different shortcuts. For a full description see kittens/hints.
768 #: }}}
769
770 #: Miscellaneous {{{
771
772 map kitty_mod+f11 toggle_fullscreen
773 map kitty_mod+f10 toggle_maximized
774 map kitty_mod+u kitten unicode_input
775 map kitty_mod+f2 edit_config_file
776 map kitty_mod+escape kitty_shell window
777
778 #: Open the kitty shell in a new window/tab/overlay/os_window to
779 #: control kitty using commands.
780
781 map kitty_mod+a>m set_background_opacity +0.1
782 map kitty_mod+a>l set_background_opacity -0.1
783 map kitty_mod+a>1 set_background_opacity 1
784 map kitty_mod+a>d set_background_opacity default
785 map kitty_mod+delete clear_terminal reset active
786
787 #: You can create shortcuts to clear/reset the terminal. For example::
788
789 #: # Reset the terminal
790 #: map kitty_mod+f9 clear_terminal reset active
791 #: # Clear the terminal screen by erasing all contents
792 #: map kitty_mod+f10 clear_terminal clear active
793 #: # Clear the terminal scrollback by erasing it
794 #: map kitty_mod+f11 clear_terminal scrollback active
795 #: # Scroll the contents of the screen into the scrollback
796 #: map kitty_mod+f12 clear_terminal scroll active
797
798 #: If you want to operate on all windows instead of just the current
799 #: one, use all instead of active.
800
801 #: It is also possible to remap Ctrl+L to both scroll the current
802 #: screen contents into the scrollback buffer and clear the screen,
803 #: instead of just clearing the screen::
804
805 #: map ctrl+l combine : clear_terminal scroll active : send_text normal,application \x0c
806
807
808 #: You can tell kitty to send arbitrary (UTF-8) encoded text to the
809 #: client program when pressing specified shortcut keys. For example::
810
811 #: map ctrl+alt+a send_text all Special text
812
813 #: This will send "Special text" when you press the ctrl+alt+a key
814 #: combination. The text to be sent is a python string literal so you
815 #: can use escapes like \x1b to send control codes or \u21fb to send
816 #: unicode characters (or you can just input the unicode characters
817 #: directly as UTF-8 text). The first argument to send_text is the
818 #: keyboard modes in which to activate the shortcut. The possible
819 #: values are normal or application or kitty or a comma separated
820 #: combination of them. The special keyword all means all modes. The
821 #: modes normal and application refer to the DECCKM cursor key mode
822 #: for terminals, and kitty refers to the special kitty extended
823 #: keyboard protocol.
824
825 #: Another example, that outputs a word and then moves the cursor to
826 #: the start of the line (same as pressing the Home key)::
827
828 #: map ctrl+alt+a send_text normal Word\x1b[H
829 #: map ctrl+alt+a send_text application Word\x1bOH
830
831 #: }}}
832
833 # }}}