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