at main 79 kB view raw
1# vim:fileencoding=utf-8: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 9font_family Fira Code 10bold_font Fira Code Bold 11italic_font auto 12bold_italic_font auto 13 14#: You can specify different fonts for the bold/italic/bold-italic 15#: variants. To get a full list of supported fonts use the `kitty 16#: +list-fonts` command. By default they are derived automatically, by 17#: the OSes font system. When bold_font or bold_italic_font is set to 18#: auto on macOS, the priority of bold fonts is semi-bold, bold, 19#: heavy. Setting them manually is useful for font families that have 20#: many weight variants like Book, Medium, Thick, etc. For example:: 21 22#: font_family Operator Mono Book 23#: bold_font Operator Mono Medium 24#: italic_font Operator Mono Book Italic 25#: bold_italic_font Operator Mono Medium Italic 26 27font_size 16.0 28 29#: Font size (in pts) 30 31# force_ltr no 32 33#: kitty does not support BIDI (bidirectional text), however, for RTL 34#: scripts, words are automatically displayed in RTL. That is to say, 35#: in an RTL script, the words "HELLO WORLD" display in kitty as 36#: "WORLD HELLO", and if you try to select a substring of an RTL- 37#: shaped string, you will get the character that would be there had 38#: the the string been LTR. For example, assuming the Hebrew word 39#: ירושלים, selecting the character that on the screen appears to be ם 40#: actually writes into the selection buffer the character י. kitty's 41#: default behavior is useful in conjunction with a filter to reverse 42#: the word order, however, if you wish to manipulate RTL glyphs, it 43#: can be very challenging to work with, so this option is provided to 44#: turn it off. Furthermore, this option can be used with the command 45#: line program GNU FriBidi 46#: <https://github.com/fribidi/fribidi#executable> to get BIDI 47#: support, because it will force kitty to always treat the text as 48#: LTR, which FriBidi expects for terminals. 49 50# - Use additional nerd symbols 51# See https://github.com/be5invis/Iosevka/issues/248 52# See https://github.com/ryanoasis/nerd-fonts/wiki/Glyph-Sets-and-Code-Points 53# Seti-UI + Custom 54symbol_map U+E5FA-U+E62B Symbols Nerd Font 55# Devicons 56symbol_map U+E700-U+E7C5 Symbols Nerd Font 57# Font Awesome 58symbol_map U+F000-U+F2E0 Symbols Nerd Font 59# Font Awesome Extension 60symbol_map U+E200-U+E2A9 Symbols Nerd Font 61# Material Design Icons 62symbol_map U+F500-U+FD46 Symbols Nerd Font 63# Weather 64symbol_map U+E300-U+E3EB Symbols Nerd Font 65# Octicons 66symbol_map U+F400-U+F4A8,U+2665,U+26A1,U+F27C Symbols Nerd Font 67# Powerline Extra Symbols 68symbol_map U+E0A3,U+E0B4-U+E0C8,U+E0CC-U+E0D2,U+E0D4 Symbols Nerd Font 69# IEC Power Symbols 70symbol_map U+23FB-U+23FE,U+2b58 Symbols Nerd Font 71# Font Logos 72symbol_map U+F300-U+F313 Symbols Nerd Font 73# Pomicons 74symbol_map U+E000-U+E00D Symbols Nerd Font 75 76# Codicons 77symbol_map U+EA60-U+EBF8 codicon 78 79#: E.g. symbol_map U+E0A0-U+E0A3,U+E0C0-U+E0C7 PowerlineSymbols 80 81#: Map the specified Unicode codepoints to a particular font. Useful 82#: if you need special rendering for some symbols, such as for 83#: Powerline. Avoids the need for patched fonts. Each Unicode code 84#: point is specified in the form `U+<code point in hexadecimal>`. You 85#: can specify multiple code points, separated by commas and ranges 86#: separated by hyphens. This option can be specified multiple times. 87#: The syntax is:: 88 89#: symbol_map codepoints Font Family Name 90 91# narrow_symbols 92 93#: E.g. narrow_symbols U+E0A0-U+E0A3,U+E0C0-U+E0C7 1 94 95#: Usually, for Private Use Unicode characters and some symbol/dingbat 96#: characters, if the character is followed by one or more spaces, 97#: kitty will use those extra cells to render the character larger, if 98#: the character in the font has a wide aspect ratio. Using this 99#: option you can force kitty to restrict the specified code points to 100#: render in the specified number of cells (defaulting to one cell). 101#: This option can be specified multiple times. The syntax is:: 102 103#: narrow_symbols codepoints [optionally the number of cells] 104 105# disable_ligatures never 106 107#: Choose how you want to handle multi-character ligatures. The 108#: default is to always render them. You can tell kitty to not render 109#: them when the cursor is over them by using cursor to make editing 110#: easier, or have kitty never render them at all by using always, if 111#: you don't like them. The ligature strategy can be set per-window 112#: either using the kitty remote control facility or by defining 113#: shortcuts for it in kitty.conf, for example:: 114 115#: map alt+1 disable_ligatures_in active always 116#: map alt+2 disable_ligatures_in all never 117#: map alt+3 disable_ligatures_in tab cursor 118 119#: Note that this refers to programming ligatures, typically 120#: implemented using the calt OpenType feature. For disabling general 121#: ligatures, use the font_features option. 122 123font_features FiraCode-Retina +zero +ss06 124 125#: E.g. font_features none 126 127#: Choose exactly which OpenType features to enable or disable. This 128#: is useful as some fonts might have features worthwhile in a 129#: terminal. For example, Fira Code includes a discretionary feature, 130#: zero, which in that font changes the appearance of the zero (0), to 131#: make it more easily distinguishable from Ø. Fira Code also includes 132#: other discretionary features known as Stylistic Sets which have the 133#: tags ss01 through ss20. 134 135#: For the exact syntax to use for individual features, see the 136#: HarfBuzz documentation <https://harfbuzz.github.io/harfbuzz-hb- 137#: common.html#hb-feature-from-string>. 138 139#: Note that this code is indexed by PostScript name, and not the font 140#: family. This allows you to define very precise feature settings; 141#: e.g. you can disable a feature in the italic font but not in the 142#: regular font. 143 144#: On Linux, font features are first read from the FontConfig database 145#: and then this option is applied, so they can be configured in a 146#: single, central place. 147 148#: To get the PostScript name for a font, use `kitty +list-fonts 149#: --psnames`: 150 151#: .. code-block:: sh 152 153#: $ kitty +list-fonts --psnames | grep Fira 154#: Fira Code 155#: Fira Code Bold (FiraCode-Bold) 156#: Fira Code Light (FiraCode-Light) 157#: Fira Code Medium (FiraCode-Medium) 158#: Fira Code Regular (FiraCode-Regular) 159#: Fira Code Retina (FiraCode-Retina) 160 161#: The part in brackets is the PostScript name. 162 163#: Enable alternate zero and oldstyle numerals:: 164 165#: font_features FiraCode-Retina +zero +onum 166 167#: Enable only alternate zero in the bold font:: 168 169#: font_features FiraCode-Bold +zero 170 171#: Disable the normal ligatures, but keep the calt feature which (in 172#: this font) breaks up monotony:: 173 174#: font_features TT2020StyleB-Regular -liga +calt 175 176#: In conjunction with force_ltr, you may want to disable Arabic 177#: shaping entirely, and only look at their isolated forms if they 178#: show up in a document. You can do this with e.g.:: 179 180#: font_features UnifontMedium +isol -medi -fina -init 181 182modify_font cell_height 120% 183 184# modify_font cell_height -3.2 # == ((16pt * 1.2) - 16pt) 185# modify_font baseline 3.2 186 187#: Modify font characteristics such as the position or thickness of 188#: the underline and strikethrough. The modifications can have the 189#: suffix px for pixels or % for percentage of original value. No 190#: suffix means use pts. For example:: 191 192modify_font underline_position 800% 193modify_font underline_thickness 1.5 194#: modify_font underline_position -2 195#: modify_font underline_thickness 150% 196#: modify_font strikethrough_position 2px 197 198#: Additionally, you can modify the size of the cell in which each 199#: font glyph is rendered and the baseline at which the glyph is 200#: placed in the cell. For example:: 201 202#: modify_font cell_width 80% 203#: modify_font cell_height -2px 204#: modify_font baseline 3 205 206#: Note that modifying the baseline will automatically adjust the 207#: underline and strikethrough positions by the same amount. 208#: Increasing the baseline raises glyphs inside the cell and 209#: decreasing it lowers them. Decreasing the cell size might cause 210#: rendering artifacts, so use with care. 211 212# box_drawing_scale 0.001, 1, 1.5, 2 213 214#: The sizes of the lines used for the box drawing Unicode characters. 215#: These values are in pts. They will be scaled by the monitor DPI to 216#: arrive at a pixel value. There must be four values corresponding to 217#: thin, normal, thick, and very thick lines. 218 219#: }}} 220 221#: Cursor customization {{{ 222 223# cursor #cccccc 224 225#: Default cursor color. If set to the special value none the cursor 226#: will be rendered with a "reverse video" effect. It's color will be 227#: the color of the text in the cell it is over and the text will be 228#: rendered with the background color of the cell. Note that if the 229#: program running in the terminal sets a cursor color, this takes 230#: precedence. Also, the cursor colors are modified if the cell 231#: background and foreground colors have very low contrast. 232 233# cursor_text_color #111111 234 235#: The color of text under the cursor. If you want it rendered with 236#: the background color of the cell underneath instead, use the 237#: special keyword: background. Note that if cursor is set to none 238#: then this option is ignored. 239 240# cursor_shape block 241 242#: The cursor shape can be one of block, beam, underline. Note that 243#: when reloading the config this will be changed only if the cursor 244#: shape has not been set by the program running in the terminal. This 245#: sets the default cursor shape, applications running in the terminal 246#: can override it. In particular, shell integration 247#: <https://sw.kovidgoyal.net/kitty/shell-integration/> in kitty sets 248#: the cursor shape to beam at shell prompts. You can avoid this by 249#: setting shell_integration to no-cursor. 250 251# cursor_beam_thickness 1.5 252 253#: The thickness of the beam cursor (in pts). 254 255# cursor_underline_thickness 2.0 256 257#: The thickness of the underline cursor (in pts). 258 259cursor_blink_interval 0 260 261#: The interval to blink the cursor (in seconds). Set to zero to 262#: disable blinking. Negative values mean use system default. Note 263#: that the minimum interval will be limited to repaint_delay. 264 265# cursor_stop_blinking_after 15.0 266 267#: Stop blinking cursor after the specified number of seconds of 268#: keyboard inactivity. Set to zero to never stop blinking. 269 270#: }}} 271 272#: Scrollback {{{ 273 274# scrollback_lines 2000 275 276#: Number of lines of history to keep in memory for scrolling back. 277#: Memory is allocated on demand. Negative numbers are (effectively) 278#: infinite scrollback. Note that using very large scrollback is not 279#: recommended as it can slow down performance of the terminal and 280#: also use large amounts of RAM. Instead, consider using 281#: scrollback_pager_history_size. Note that on config reload if this 282#: is changed it will only affect newly created windows, not existing 283#: ones. 284 285# scrollback_pager less --chop-long-lines --RAW-CONTROL-CHARS +INPUT_LINE_NUMBER 286 287#: Program with which to view scrollback in a new window. The 288#: scrollback buffer is passed as STDIN to this program. If you change 289#: it, make sure the program you use can handle ANSI escape sequences 290#: for colors and text formatting. INPUT_LINE_NUMBER in the command 291#: line above will be replaced by an integer representing which line 292#: should be at the top of the screen. Similarly CURSOR_LINE and 293#: CURSOR_COLUMN will be replaced by the current cursor position or 294#: set to 0 if there is no cursor, for example, when showing the last 295#: command output. 296 297# scrollback_pager_history_size 0 298 299#: Separate scrollback history size (in MB), used only for browsing 300#: the scrollback buffer with pager. This separate buffer is not 301#: available for interactive scrolling but will be piped to the pager 302#: program when viewing scrollback buffer in a separate window. The 303#: current implementation stores the data in UTF-8, so approximatively 304#: 10000 lines per megabyte at 100 chars per line, for pure ASCII, 305#: unformatted text. A value of zero or less disables this feature. 306#: The maximum allowed size is 4GB. Note that on config reload if this 307#: is changed it will only affect newly created windows, not existing 308#: ones. 309 310# scrollback_fill_enlarged_window no 311 312#: Fill new space with lines from the scrollback buffer after 313#: enlarging a window. 314 315# wheel_scroll_multiplier 5.0 316 317#: Multiplier for the number of lines scrolled by the mouse wheel. 318#: Note that this is only used for low precision scrolling devices, 319#: not for high precision scrolling devices on platforms such as macOS 320#: and Wayland. Use negative numbers to change scroll direction. See 321#: also wheel_scroll_min_lines. 322 323# wheel_scroll_min_lines 1 324 325#: The minimum number of lines scrolled by the mouse wheel. The scroll 326#: multiplier wheel_scroll_multiplier only takes effect after it 327#: reaches this number. Note that this is only used for low precision 328#: scrolling devices like wheel mice that scroll by very small amounts 329#: when using the wheel. With a negative number, the minimum number of 330#: lines will always be added. 331 332# touch_scroll_multiplier 1.0 333 334#: Multiplier for the number of lines scrolled by a touchpad. Note 335#: that this is only used for high precision scrolling devices on 336#: platforms such as macOS and Wayland. Use negative numbers to change 337#: scroll direction. 338 339#: }}} 340 341#: Mouse {{{ 342 343# mouse_hide_wait 3.0 344 345#: Hide mouse cursor after the specified number of seconds of the 346#: mouse not being used. Set to zero to disable mouse cursor hiding. 347#: Set to a negative value to hide the mouse cursor immediately when 348#: typing text. Disabled by default on macOS as getting it to work 349#: robustly with the ever-changing sea of bugs that is Cocoa is too 350#: much effort. 351 352# url_color #0087bd 353# url_style curly 354 355#: The color and style for highlighting URLs on mouse-over. url_style 356#: can be one of: none, straight, double, curly, dotted, dashed. 357 358# open_url_with default 359 360#: The program to open clicked URLs. The special value default with 361#: first look for any URL handlers defined via the open_actions 362#: <https://sw.kovidgoyal.net/kitty/open_actions/> facility and if non 363#: are found, it will use the Operating System's default URL handler 364#: (open on macOS and xdg-open on Linux). 365 366# url_prefixes file ftp ftps gemini git gopher http https irc ircs kitty mailto news sftp ssh 367 368#: The set of URL prefixes to look for when detecting a URL under the 369#: mouse cursor. 370 371# detect_urls yes 372 373#: Detect URLs under the mouse. Detected URLs are highlighted with an 374#: underline and the mouse cursor becomes a hand over them. Even if 375#: this option is disabled, URLs are still clickable. 376 377# url_excluded_characters 378 379#: Additional characters to be disallowed from URLs, when detecting 380#: URLs under the mouse cursor. By default, all characters that are 381#: legal in URLs are allowed. 382 383# copy_on_select no 384 385#: Copy to clipboard or a private buffer on select. With this set to 386#: clipboard, selecting text with the mouse will cause the text to be 387#: copied to clipboard. Useful on platforms such as macOS that do not 388#: have the concept of primary selection. You can instead specify a 389#: name such as a1 to copy to a private kitty buffer. Map a shortcut 390#: with the paste_from_buffer action to paste from this private 391#: buffer. For example:: 392 393#: copy_on_select a1 394#: map shift+cmd+v paste_from_buffer a1 395 396#: Note that copying to the clipboard is a security risk, as all 397#: programs, including websites open in your browser can read the 398#: contents of the system clipboard. 399 400# paste_actions quote-urls-at-prompt 401 402#: A comma separated list of actions to take when pasting text into 403#: the terminal. The supported paste actions are: 404 405#: quote-urls-at-prompt: 406#: If the text being pasted is a URL and the cursor is at a shell prompt, 407#: automatically quote the URL (needs shell_integration). 408#: confirm: 409#: Confirm the paste if bracketed paste mode is not active or there is more 410#: a large amount of text being pasted. 411#: filter: 412#: Run the filter_paste() function from the file paste-actions.py in 413#: the kitty config directory on the pasted text. The text returned by the 414#: function will be actually pasted. 415 416# strip_trailing_spaces never 417 418#: Remove spaces at the end of lines when copying to clipboard. A 419#: value of smart will do it when using normal selections, but not 420#: rectangle selections. A value of always will always do it. 421 422# select_by_word_characters @-./_~?&=%+# 423 424#: Characters considered part of a word when double clicking. In 425#: addition to these characters any character that is marked as an 426#: alphanumeric character in the Unicode database will be matched. 427 428# select_by_word_characters_forward 429 430#: Characters considered part of a word when extending the selection 431#: forward on double clicking. In addition to these characters any 432#: character that is marked as an alphanumeric character in the 433#: Unicode database will be matched. 434 435#: If empty (default) select_by_word_characters will be used for both 436#: directions. 437 438# click_interval -1.0 439 440#: The interval between successive clicks to detect double/triple 441#: clicks (in seconds). Negative numbers will use the system default 442#: instead, if available, or fallback to 0.5. 443 444# focus_follows_mouse no 445 446#: Set the active window to the window under the mouse when moving the 447#: mouse around. 448 449# pointer_shape_when_grabbed arrow 450 451#: The shape of the mouse pointer when the program running in the 452#: terminal grabs the mouse. Valid values are: arrow, beam and hand. 453 454# default_pointer_shape beam 455 456#: The default shape of the mouse pointer. Valid values are: arrow, 457#: beam and hand. 458 459# pointer_shape_when_dragging beam 460 461#: The default shape of the mouse pointer when dragging across text. 462#: Valid values are: arrow, beam and hand. 463 464#: Mouse actions {{{ 465 466#: Mouse buttons can be mapped to perform arbitrary actions. The 467#: syntax is: 468 469#: .. code-block:: none 470 471#: mouse_map button-name event-type modes action 472 473#: Where button-name is one of left, middle, right, b1 ... b8 with 474#: added keyboard modifiers. For example: ctrl+shift+left refers to 475#: holding the Ctrl+Shift keys while clicking with the left mouse 476#: button. The value b1 ... b8 can be used to refer to up to eight 477#: buttons on a mouse. 478 479#: event-type is one of press, release, doublepress, triplepress, 480#: click, doubleclick. modes indicates whether the action is performed 481#: when the mouse is grabbed by the program running in the terminal, 482#: or not. The values are grabbed or ungrabbed or a comma separated 483#: combination of them. grabbed refers to when the program running in 484#: the terminal has requested mouse events. Note that the click and 485#: double click events have a delay of click_interval to disambiguate 486#: from double and triple presses. 487 488#: You can run kitty with the kitty --debug-input command line option 489#: to see mouse events. See the builtin actions below to get a sense 490#: of what is possible. 491 492#: If you want to unmap an action, map it to no_op. For example, to 493#: disable opening of URLs with a plain click:: 494 495#: mouse_map left click ungrabbed no_op 496 497#: See all the mappable actions including mouse actions here 498#: <https://sw.kovidgoyal.net/kitty/actions/>. 499 500#: .. note:: 501#: Once a selection is started, releasing the button that started it will 502#: automatically end it and no release event will be dispatched. 503 504# clear_all_mouse_actions no 505 506#: Remove all mouse action definitions up to this point. Useful, for 507#: instance, to remove the default mouse actions. 508 509#: Click the link under the mouse or move the cursor 510 511# mouse_map left click ungrabbed mouse_handle_click selection link prompt 512 513#:: First check for a selection and if one exists do nothing. Then 514#:: check for a link under the mouse cursor and if one exists, click 515#:: it. Finally check if the click happened at the current shell 516#:: prompt and if so, move the cursor to the click location. Note 517#:: that this requires shell integration 518#:: <https://sw.kovidgoyal.net/kitty/shell-integration/> to work. 519 520#: Click the link under the mouse or move the cursor even when grabbed 521 522# mouse_map shift+left click grabbed,ungrabbed mouse_handle_click selection link prompt 523 524#:: Same as above, except that the action is performed even when the 525#:: mouse is grabbed by the program running in the terminal. 526 527#: Click the link under the mouse cursor 528 529# mouse_map ctrl+shift+left release grabbed,ungrabbed mouse_handle_click link 530 531#:: Variant with Ctrl+Shift is present because the simple click based 532#:: version has an unavoidable delay of click_interval, to 533#:: disambiguate clicks from double clicks. 534 535#: Discard press event for link click 536 537# mouse_map ctrl+shift+left press grabbed discard_event 538 539#:: Prevent this press event from being sent to the program that has 540#:: grabbed the mouse, as the corresponding release event is used to 541#:: open a URL. 542 543#: Paste from the primary selection 544 545# mouse_map middle release ungrabbed paste_from_selection 546 547#: Start selecting text 548 549# mouse_map left press ungrabbed mouse_selection normal 550 551#: Start selecting text in a rectangle 552 553# mouse_map ctrl+alt+left press ungrabbed mouse_selection rectangle 554 555#: Select a word 556 557# mouse_map left doublepress ungrabbed mouse_selection word 558 559#: Select a line 560 561# mouse_map left triplepress ungrabbed mouse_selection line 562 563#: Select line from point 564 565# mouse_map ctrl+alt+left triplepress ungrabbed mouse_selection line_from_point 566 567#:: Select from the clicked point to the end of the line. 568 569#: Extend the current selection 570 571# mouse_map right press ungrabbed mouse_selection extend 572 573#:: If you want only the end of the selection to be moved instead of 574#:: the nearest boundary, use move-end instead of extend. 575 576#: Paste from the primary selection even when grabbed 577 578# mouse_map shift+middle release ungrabbed,grabbed paste_selection 579# mouse_map shift+middle press grabbed discard_event 580 581#: Start selecting text even when grabbed 582 583# mouse_map shift+left press ungrabbed,grabbed mouse_selection normal 584 585#: Start selecting text in a rectangle even when grabbed 586 587# mouse_map ctrl+shift+alt+left press ungrabbed,grabbed mouse_selection rectangle 588 589#: Select a word even when grabbed 590 591# mouse_map shift+left doublepress ungrabbed,grabbed mouse_selection word 592 593#: Select a line even when grabbed 594 595# mouse_map shift+left triplepress ungrabbed,grabbed mouse_selection line 596 597#: Select line from point even when grabbed 598 599# mouse_map ctrl+shift+alt+left triplepress ungrabbed,grabbed mouse_selection line_from_point 600 601#:: Select from the clicked point to the end of the line even when 602#:: grabbed. 603 604#: Extend the current selection even when grabbed 605 606# mouse_map shift+right press ungrabbed,grabbed mouse_selection extend 607 608#: Show clicked command output in pager 609 610# mouse_map ctrl+shift+right press ungrabbed mouse_show_command_output 611 612#:: Requires shell integration 613#:: <https://sw.kovidgoyal.net/kitty/shell-integration/> to work. 614 615#: }}} 616 617#: }}} 618 619#: Performance tuning {{{ 620 621# repaint_delay 10 622 623#: Delay between screen updates (in milliseconds). Decreasing it, 624#: increases frames-per-second (FPS) at the cost of more CPU usage. 625#: The default value yields ~100 FPS which is more than sufficient for 626#: most uses. Note that to actually achieve 100 FPS, you have to 627#: either set sync_to_monitor to no or use a monitor with a high 628#: refresh rate. Also, to minimize latency when there is pending input 629#: to be processed, this option is ignored. 630 631# input_delay 3 632 633#: Delay before input from the program running in the terminal is 634#: processed (in milliseconds). Note that decreasing it will increase 635#: responsiveness, but also increase CPU usage and might cause flicker 636#: in full screen programs that redraw the entire screen on each loop, 637#: because kitty is so fast that partial screen updates will be drawn. 638 639# sync_to_monitor yes 640 641#: Sync screen updates to the refresh rate of the monitor. This 642#: prevents screen tearing 643#: <https://en.wikipedia.org/wiki/Screen_tearing> when scrolling. 644#: However, it limits the rendering speed to the refresh rate of your 645#: monitor. With a very high speed mouse/high keyboard repeat rate, 646#: you may notice some slight input latency. If so, set this to no. 647 648#: }}} 649 650#: Terminal bell {{{ 651 652# enable_audio_bell yes 653 654#: The audio bell. Useful to disable it in environments that require 655#: silence. 656 657# visual_bell_duration 0.0 658 659#: The visual bell duration (in seconds). Flash the screen when a bell 660#: occurs for the specified number of seconds. Set to zero to disable. 661 662# visual_bell_color none 663 664#: The color used by visual bell. Set to none will fall back to 665#: selection background color. If you feel that the visual bell is too 666#: bright, you can set it to a darker color. 667 668# window_alert_on_bell yes 669 670#: Request window attention on bell. Makes the dock icon bounce on 671#: macOS or the taskbar flash on linux. 672 673# bell_on_tab "🔔 " 674 675#: Some text or a Unicode symbol to show on the tab if a window in the 676#: tab that does not have focus has a bell. If you want to use leading 677#: or trailing spaces, surround the text with quotes. See 678#: tab_title_template for how this is rendered. 679 680#: For backwards compatibility, values of yes, y and true are 681#: converted to the default bell symbol and no, n, false and none are 682#: converted to the empty string. 683 684# command_on_bell none 685 686#: Program to run when a bell occurs. The environment variable 687#: KITTY_CHILD_CMDLINE can be used to get the program running in the 688#: window in which the bell occurred. 689 690# bell_path none 691 692#: Path to a sound file to play as the bell sound. If set to none, the 693#: system default bell sound is used. Must be in a format supported by 694#: the operating systems sound API, such as WAV or OGA on Linux 695#: (libcanberra) or AIFF, MP3 or WAV on macOS (NSSound) 696 697#: }}} 698 699#: Window layout {{{ 700 701# remember_window_size yes 702# initial_window_width 640 703# initial_window_height 400 704 705#: If enabled, the window size will be remembered so that new 706#: instances of kitty will have the same size as the previous 707#: instance. If disabled, the window will initially have size 708#: configured by initial_window_width/height, in pixels. You can use a 709#: suffix of "c" on the width/height values to have them interpreted 710#: as number of cells instead of pixels. 711 712# enabled_layouts * 713 714#: The enabled window layouts. A comma separated list of layout names. 715#: The special value all means all layouts. The first listed layout 716#: will be used as the startup layout. Default configuration is all 717#: layouts in alphabetical order. For a list of available layouts, see 718#: the layouts <https://sw.kovidgoyal.net/kitty/overview/#layouts>. 719 720# window_resize_step_cells 2 721# window_resize_step_lines 2 722 723#: The step size (in units of cell width/cell height) to use when 724#: resizing kitty windows in a layout with the shortcut 725#: start_resizing_window. The cells value is used for horizontal 726#: resizing, and the lines value is used for vertical resizing. 727 728# window_border_width 0.5pt 729 730#: The width of window borders. Can be either in pixels (px) or pts 731#: (pt). Values in pts will be rounded to the nearest number of pixels 732#: based on screen resolution. If not specified, the unit is assumed 733#: to be pts. Note that borders are displayed only when more than one 734#: window is visible. They are meant to separate multiple windows. 735 736# draw_minimal_borders yes 737 738#: Draw only the minimum borders needed. This means that only the 739#: borders that separate the inactive window from a neighbor are 740#: drawn. Note that setting a non-zero window_margin_width overrides 741#: this and causes all borders to be drawn. 742 743# window_margin_width 0 744 745#: The window margin (in pts) (blank area outside the border). A 746#: single value sets all four sides. Two values set the vertical and 747#: horizontal sides. Three values set top, horizontal and bottom. Four 748#: values set top, right, bottom and left. 749 750# single_window_margin_width -1 751 752#: The window margin to use when only a single window is visible (in 753#: pts). Negative values will cause the value of window_margin_width 754#: to be used instead. A single value sets all four sides. Two values 755#: set the vertical and horizontal sides. Three values set top, 756#: horizontal and bottom. Four values set top, right, bottom and left. 757 758window_padding_width 0 759 760#: The window padding (in pts) (blank area between the text and the 761#: window border). A single value sets all four sides. Two values set 762#: the vertical and horizontal sides. Three values set top, horizontal 763#: and bottom. Four values set top, right, bottom and left. 764 765# placement_strategy center 766 767#: When the window size is not an exact multiple of the cell size, the 768#: cell area of the terminal window will have some extra padding on 769#: the sides. You can control how that padding is distributed with 770#: this option. Using a value of center means the cell area will be 771#: placed centrally. A value of top-left means the padding will be 772#: only at the bottom and right edges. 773 774# active_border_color #00ff00 775 776#: The color for the border of the active window. Set this to none to 777#: not draw borders around the active window. 778 779# inactive_border_color #cccccc 780 781#: The color for the border of inactive windows. 782 783# bell_border_color #ff5a00 784 785#: The color for the border of inactive windows in which a bell has 786#: occurred. 787 788# inactive_text_alpha 1.0 789 790#: Fade the text in inactive windows by the specified amount (a number 791#: between zero and one, with zero being fully faded). 792 793# hide_window_decorations no 794 795#: Hide the window decorations (title-bar and window borders) with 796#: yes. On macOS, titlebar-only can be used to only hide the titlebar. 797#: Whether this works and exactly what effect it has depends on the 798#: window manager/operating system. Note that the effects of changing 799#: this option when reloading config are undefined. 800 801# window_logo_path none 802 803#: Path to a logo image. Must be in PNG format. Relative paths are 804#: interpreted relative to the kitty config directory. The logo is 805#: displayed in a corner of every kitty window. The position is 806#: controlled by window_logo_position. Individual windows can be 807#: configured to have different logos either using the launch action 808#: or the remote control <https://sw.kovidgoyal.net/kitty/remote- 809#: control/> facility. 810 811# window_logo_position bottom-right 812 813#: Where to position the window logo in the window. The value can be 814#: one of: top-left, top, top-right, left, center, right, bottom-left, 815#: bottom, bottom-right. 816 817# window_logo_alpha 0.5 818 819#: The amount the logo should be faded into the background. With zero 820#: being fully faded and one being fully opaque. 821 822# resize_debounce_time 0.1 823 824#: The time to wait before redrawing the screen when a resize event is 825#: received (in seconds). On platforms such as macOS, where the 826#: operating system sends events corresponding to the start and end of 827#: a resize, this number is ignored. 828 829# resize_draw_strategy static 830 831#: Choose how kitty draws a window while a resize is in progress. A 832#: value of static means draw the current window contents, mostly 833#: unchanged. A value of scale means draw the current window contents 834#: scaled. A value of blank means draw a blank window. A value of size 835#: means show the window size in cells. 836 837resize_in_steps yes 838 839#: Resize the OS window in steps as large as the cells, instead of 840#: with the usual pixel accuracy. Combined with initial_window_width 841#: and initial_window_height in number of cells, this option can be 842#: used to keep the margins as small as possible when resizing the OS 843#: window. Note that this does not currently work on Wayland. 844 845# visual_window_select_characters 1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ 846 847#: The list of characters for visual window selection. For example, 848#: for selecting a window to focus on with focus_visible_window. The 849#: value should be a series of unique numbers or alphabets, case 850#: insensitive, from the set [0-9A-Z]. Specify your preference as a 851#: string of characters. 852 853# confirm_os_window_close -1 854 855#: Ask for confirmation when closing an OS window or a tab with at 856#: least this number of kitty windows in it by window manager (e.g. 857#: clicking the window close button or pressing the operating system 858#: shortcut to close windows) or by the close_tab action. A value of 859#: zero disables confirmation. This confirmation also applies to 860#: requests to quit the entire application (all OS windows, via the 861#: quit action). Negative values are converted to positive ones, 862#: however, with shell_integration enabled, using negative values 863#: means windows sitting at a shell prompt are not counted, only 864#: windows where some command is currently running. Note that if you 865#: want confirmation when closing individual windows, you can map the 866#: close_window_with_confirmation action. 867 868#: }}} 869 870#: Tab bar {{{ 871 872# tab_bar_edge bottom 873 874#: The edge to show the tab bar on, top or bottom. 875 876# tab_bar_margin_width 0.0 877 878#: The margin to the left and right of the tab bar (in pts). 879 880# tab_bar_margin_height 0.0 0.0 881 882#: The margin above and below the tab bar (in pts). The first number 883#: is the margin between the edge of the OS Window and the tab bar. 884#: The second number is the margin between the tab bar and the 885#: contents of the current tab. 886 887# tab_bar_style fade 888 889#: The tab bar style, can be one of: 890 891#: fade 892#: Each tab's edges fade into the background color. (See also tab_fade) 893#: slant 894#: Tabs look like the tabs in a physical file. 895#: separator 896#: Tabs are separated by a configurable separator. (See also 897#: tab_separator) 898#: powerline 899#: Tabs are shown as a continuous line with "fancy" separators. 900#: (See also tab_powerline_style) 901#: custom 902#: A user-supplied Python function called draw_tab is loaded from the file 903#: tab_bar.py in the kitty config directory. For examples of how to 904#: write such a function, see the functions named draw_tab_with_* in 905#: kitty's source code: kitty/tab_bar.py. See also 906#: this discussion <https://github.com/kovidgoyal/kitty/discussions/4447> 907#: for examples from kitty users. 908#: hidden 909#: The tab bar is hidden. If you use this, you might want to create a mapping 910#: for the select_tab action which presents you with a list of tabs and 911#: allows for easy switching to a tab. 912 913# tab_bar_align left 914 915#: The horizontal alignment of the tab bar, can be one of: left, 916#: center, right. 917 918# tab_bar_min_tabs 2 919 920#: The minimum number of tabs that must exist before the tab bar is 921#: shown. 922 923# tab_switch_strategy previous 924 925#: The algorithm to use when switching to a tab when the current tab 926#: is closed. The default of previous will switch to the last used 927#: tab. A value of left will switch to the tab to the left of the 928#: closed tab. A value of right will switch to the tab to the right of 929#: the closed tab. A value of last will switch to the right-most tab. 930 931# tab_fade 0.25 0.5 0.75 1 932 933#: Control how each tab fades into the background when using fade for 934#: the tab_bar_style. Each number is an alpha (between zero and one) 935#: that controls how much the corresponding cell fades into the 936#: background, with zero being no fade and one being full fade. You 937#: can change the number of cells used by adding/removing entries to 938#: this list. 939 940# tab_separator " ┇" 941 942#: The separator between tabs in the tab bar when using separator as 943#: the tab_bar_style. 944 945# tab_powerline_style angled 946 947#: The powerline separator style between tabs in the tab bar when 948#: using powerline as the tab_bar_style, can be one of: angled, 949#: slanted, round. 950 951# tab_activity_symbol none 952 953#: Some text or a Unicode symbol to show on the tab if a window in the 954#: tab that does not have focus has some activity. If you want to use 955#: leading or trailing spaces, surround the text with quotes. See 956#: tab_title_template for how this is rendered. 957 958# tab_title_template "{fmt.fg.red}{bell_symbol}{activity_symbol}{fmt.fg.tab}{title}" 959 960#: A template to render the tab title. The default just renders the 961#: title with optional symbols for bell and activity. If you wish to 962#: include the tab-index as well, use something like: {index}:{title}. 963#: Useful if you have shortcuts mapped for goto_tab N. If you prefer 964#: to see the index as a superscript, use {sup.index}. All data 965#: available is: 966 967#: title 968#: The current tab title. 969#: index 970#: The tab index useable with goto_tab N goto_tab shortcuts. 971#: layout_name 972#: The current layout name. 973#: num_windows 974#: The number of windows in the tab. 975#: num_window_groups 976#: The number of window groups (not counting overlay windows) in the tab. 977#: tab.active_wd 978#: The working directory of the currently active window in the tab (expensive, 979#: requires syscall). 980#: max_title_length 981#: The maximum title length available. 982 983#: Note that formatting is done by Python's string formatting 984#: machinery, so you can use, for instance, {layout_name[:2].upper()} 985#: to show only the first two letters of the layout name, upper-cased. 986#: If you want to style the text, you can use styling directives, for 987#: example: 988#: `{fmt.fg.red}red{fmt.fg.tab}normal{fmt.bg._00FF00}greenbg{fmt.bg.tab}`. 989#: Similarly, for bold and italic: 990#: `{fmt.bold}bold{fmt.nobold}normal{fmt.italic}italic{fmt.noitalic}`. 991#: Note that for backward compatibility, if {bell_symbol} or 992#: {activity_symbol} are not present in the template, they are 993#: prepended to it. 994 995# active_tab_title_template none 996 997#: Template to use for active tabs. If not specified falls back to 998#: tab_title_template. 999 1000# active_tab_foreground #000 1001# active_tab_background #eee 1002# active_tab_font_style bold-italic 1003# inactive_tab_foreground #444 1004# inactive_tab_background #999 1005# inactive_tab_font_style normal 1006 1007#: Tab bar colors and styles. 1008 1009# tab_bar_background none 1010 1011#: Background color for the tab bar. Defaults to using the terminal 1012#: background color. 1013 1014# tab_bar_margin_color none 1015 1016#: Color for the tab bar margin area. Defaults to using the terminal 1017#: background color. 1018 1019#: }}} 1020 1021#: Color scheme {{{ 1022 1023# foreground #dddddd 1024# background #000000 1025 1026#: The foreground and background colors. 1027 1028# background_opacity 0.9 1029 1030#: The opacity of the background. A number between zero and one, where 1031#: one is opaque and zero is fully transparent. This will only work if 1032#: supported by the OS (for instance, when using a compositor under 1033#: X11). Note that it only sets the background color's opacity in 1034#: cells that have the same background color as the default terminal 1035#: background, so that things like the status bar in vim, powerline 1036#: prompts, etc. still look good. But it means that if you use a color 1037#: theme with a background color in your editor, it will not be 1038#: rendered as transparent. Instead you should change the default 1039#: background color in your kitty config and not use a background 1040#: color in the editor color scheme. Or use the escape codes to set 1041#: the terminals default colors in a shell script to launch your 1042#: editor. Be aware that using a value less than 1.0 is a (possibly 1043#: significant) performance hit. If you want to dynamically change 1044#: transparency of windows, set dynamic_background_opacity to yes 1045#: (this is off by default as it has a performance cost). Changing 1046#: this option when reloading the config will only work if 1047#: dynamic_background_opacity was enabled in the original config. 1048 1049# background_image none 1050 1051#: Path to a background image. Must be in PNG format. 1052 1053# background_image_layout tiled 1054 1055#: Whether to tile, scale or clamp the background image. The value can 1056#: be one of tiled, mirror-tiled, scaled, clamped or centered. 1057 1058# background_image_linear no 1059 1060#: When background image is scaled, whether linear interpolation 1061#: should be used. 1062 1063# dynamic_background_opacity no 1064 1065#: Allow changing of the background_opacity dynamically, using either 1066#: keyboard shortcuts (increase_background_opacity and 1067#: decrease_background_opacity) or the remote control facility. 1068#: Changing this option by reloading the config is not supported. 1069 1070# background_tint 0.0 1071 1072#: How much to tint the background image by the background color. 1073#: This option makes it easier to read the text. Tinting is done using 1074#: the current background color for each window. This option applies 1075#: only if background_opacity is set and transparent windows are 1076#: supported or background_image is set. 1077 1078# dim_opacity 0.75 1079 1080#: How much to dim text that has the DIM/FAINT attribute set. One 1081#: means no dimming and zero means fully dimmed (i.e. invisible). 1082 1083# selection_foreground #000000 1084# selection_background #fffacd 1085 1086#: The foreground and background colors for text selected with the 1087#: mouse. Setting both of these to none will cause a "reverse video" 1088#: effect for selections, where the selection will be the cell text 1089#: color and the text will become the cell background color. Setting 1090#: only selection_foreground to none will cause the foreground color 1091#: to be used unchanged. Note that these colors can be overridden by 1092#: the program running in the terminal. 1093 1094#: The color table {{{ 1095 1096#: The 256 terminal colors. There are 8 basic colors, each color has a 1097#: dull and bright version, for the first 16 colors. You can set the 1098#: remaining 240 colors as color16 to color255. 1099 1100# color0 #000000 1101# color8 #767676 1102 1103#: black 1104 1105# color1 #cc0403 1106# color9 #f2201f 1107 1108#: red 1109 1110# color2 #19cb00 1111# color10 #23fd00 1112 1113#: green 1114 1115# color3 #cecb00 1116# color11 #fffd00 1117 1118#: yellow 1119 1120# color4 #0d73cc 1121# color12 #1a8fff 1122 1123#: blue 1124 1125# color5 #cb1ed1 1126# color13 #fd28ff 1127 1128#: magenta 1129 1130# color6 #0dcdcd 1131# color14 #14ffff 1132 1133#: cyan 1134 1135# color7 #dddddd 1136# color15 #ffffff 1137 1138#: white 1139 1140# mark1_foreground black 1141 1142#: Color for marks of type 1 1143 1144# mark1_background #98d3cb 1145 1146#: Color for marks of type 1 (light steel blue) 1147 1148# mark2_foreground black 1149 1150#: Color for marks of type 2 1151 1152# mark2_background #f2dcd3 1153 1154#: Color for marks of type 1 (beige) 1155 1156# mark3_foreground black 1157 1158#: Color for marks of type 3 1159 1160# mark3_background #f274bc 1161 1162#: Color for marks of type 3 (violet) 1163 1164#: }}} 1165 1166#: }}} 1167 1168#: Advanced {{{ 1169 1170# shell . 1171 1172#: The shell program to execute. The default value of . means to use 1173#: whatever shell is set as the default shell for the current user. 1174#: Note that on macOS if you change this, you might need to add 1175#: --login and --interactive to ensure that the shell starts in 1176#: interactive mode and reads its startup rc files. 1177 1178# editor . 1179 1180#: The terminal based text editor (such as vim or nano) to use when 1181#: editing the kitty config file or similar tasks. 1182 1183#: The default value of . means to use the environment variables 1184#: VISUAL and EDITOR in that order. If these variables aren't set, 1185#: kitty will run your shell ($SHELL -l -i -c env) to see if your 1186#: shell startup rc files set VISUAL or EDITOR. If that doesn't work, 1187#: kitty will cycle through various known editors (vim, emacs, etc.) 1188#: and take the first one that exists on your system. 1189 1190# close_on_child_death no 1191 1192#: Close the window when the child process (shell) exits. With the 1193#: default value no, the terminal will remain open when the child 1194#: exits as long as there are still processes outputting to the 1195#: terminal (for example disowned or backgrounded processes). When 1196#: enabled with yes, the window will close as soon as the child 1197#: process exits. Note that setting it to yes means that any 1198#: background processes still using the terminal can fail silently 1199#: because their stdout/stderr/stdin no longer work. 1200 1201# remote_control_password 1202 1203#: Allow other programs to control kitty using passwords. This option 1204#: can be specified multiple times to add multiple passwords. If no 1205#: passwords are present kitty will ask the user for permission if a 1206#: program tries to use remote control with a password. A password can 1207#: also *optionally* be associated with a set of allowed remote 1208#: control actions. For example:: 1209 1210#: remote_control_password "my passphrase" get-colors set-colors focus-window focus-tab 1211 1212#: Only the specified actions will be allowed when using this 1213#: password. Glob patterns can be used too, for example:: 1214 1215#: remote_control_password "my passphrase" set-tab-* resize-* 1216 1217#: To get a list of available actions, run:: 1218 1219#: kitty @ --help 1220 1221#: A set of actions to be allowed when no password is sent can be 1222#: specified by using an empty password, for example:: 1223 1224#: remote_control_password "" *-colors 1225 1226#: Finally, the path to a python module can be specified that provides 1227#: a function is_cmd_allowed that is used to check every remote 1228#: control command. See rc_custom_auth 1229#: <https://sw.kovidgoyal.net/kitty/remote-control/#rc-custom-auth> 1230#: for details. For example:: 1231 1232#: remote_control_password "my passphrase" my_rc_command_checker.py 1233 1234#: Relative paths are resolved from the kitty configuration directory. 1235 1236# allow_remote_control no 1237 1238#: Allow other programs to control kitty. If you turn this on, other 1239#: programs can control all aspects of kitty, including sending text 1240#: to kitty windows, opening new windows, closing windows, reading the 1241#: content of windows, etc. Note that this even works over SSH 1242#: connections. The default setting of no prevents any form of remote 1243#: control. The meaning of the various values are: 1244 1245#: password 1246#: Remote control requests received over both the TTY device and the socket are 1247#: confirmed based on passwords, see remote_control_password. 1248 1249#: socket-only 1250#: Remote control requests received over a socket are accepted unconditionally. 1251#: Requests received over the TTY are denied. See listen_on. 1252 1253#: socket 1254#: Remote control requests received over a socket are accepted unconditionally. 1255#: Requests received over the TTY are confirmed based on password. 1256 1257#: no 1258#: Remote control is completely disabled. 1259 1260#: yes 1261#: Remote control requests are always accepted. 1262 1263# listen_on none 1264 1265#: Listen to the specified UNIX socket for remote control connections. 1266#: Note that this will apply to all kitty instances. It can be 1267#: overridden by the kitty --listen-on command line option, which also 1268#: supports listening on a TCP socket. This option accepts only UNIX 1269#: sockets, such as unix:${TEMP}/mykitty or unix:@mykitty (on Linux). 1270#: Environment variables are expanded and relative paths are resolved 1271#: with respect to the temporary directory. If {kitty_pid} is present, 1272#: then it is replaced by the PID of the kitty process, otherwise the 1273#: PID of the kitty process is appended to the value, with a hyphen. 1274#: See the help for kitty --listen-on for more details. Note that this 1275#: will be ignored unless allow_remote_control is set to either: yes, 1276#: socket or socket-only. Changing this option by reloading the config 1277#: is not supported. 1278 1279# env 1280 1281#: Specify the environment variables to be set in all child processes. 1282#: Using the name with an equal sign (e.g. env VAR=) will set it to 1283#: the empty string. Specifying only the name (e.g. env VAR) will 1284#: remove the variable from the child process' environment. Note that 1285#: environment variables are expanded recursively, for example:: 1286 1287#: env VAR1=a 1288#: env VAR2=${HOME}/${VAR1}/b 1289 1290#: The value of VAR2 will be <path to home directory>/a/b. 1291 1292# watcher 1293 1294#: Path to python file which will be loaded for watchers 1295#: <https://sw.kovidgoyal.net/kitty/launch/#watchers>. Can be 1296#: specified more than once to load multiple watchers. The watchers 1297#: will be added to every kitty window. Relative paths are resolved 1298#: relative to the kitty config directory. Note that reloading the 1299#: config will only affect windows created after the reload. 1300 1301# exe_search_path 1302 1303#: Control where kitty finds the programs to run. The default search 1304#: order is: First search the system wide PATH, then ~/.local/bin and 1305#: ~/bin. If still not found, the PATH defined in the login shell 1306#: after sourcing all its startup files is tried. Finally, if present, 1307#: the PATH specified by the env option is tried. 1308 1309#: This option allows you to prepend, append, or remove paths from 1310#: this search order. It can be specified multiple times for multiple 1311#: paths. A simple path will be prepended to the search order. A path 1312#: that starts with the + sign will be append to the search order, 1313#: after ~/bin above. A path that starts with the - sign will be 1314#: removed from the entire search order. For example:: 1315 1316#: exe_search_path /some/prepended/path 1317#: exe_search_path +/some/appended/path 1318#: exe_search_path -/some/excluded/path 1319 1320# update_check_interval 24 1321 1322#: The interval to periodically check if an update to kitty is 1323#: available (in hours). If an update is found, a system notification 1324#: is displayed informing you of the available update. The default is 1325#: to check every 24 hours, set to zero to disable. Update checking is 1326#: only done by the official binary builds. Distro packages or source 1327#: builds do not do update checking. Changing this option by reloading 1328#: the config is not supported. 1329 1330# startup_session none 1331 1332#: Path to a session file to use for all kitty instances. Can be 1333#: overridden by using the kitty --session command line option for 1334#: individual instances. See sessions 1335#: <https://sw.kovidgoyal.net/kitty/overview/#sessions> in the kitty 1336#: documentation for details. Note that relative paths are interpreted 1337#: with respect to the kitty config directory. Environment variables 1338#: in the path are expanded. Changing this option by reloading the 1339#: config is not supported. 1340 1341# clipboard_control write-clipboard write-primary read-clipboard-ask read-primary-ask 1342 1343#: Allow programs running in kitty to read and write from the 1344#: clipboard. You can control exactly which actions are allowed. The 1345#: possible actions are: write-clipboard, read-clipboard, write- 1346#: primary, read-primary, read-clipboard-ask, read-primary-ask. The 1347#: default is to allow writing to the clipboard and primary selection 1348#: and to ask for permission when a program tries to read from the 1349#: clipboard. Note that disabling the read confirmation is a security 1350#: risk as it means that any program, even the ones running on a 1351#: remote server via SSH can read your clipboard. See also 1352#: clipboard_max_size. 1353 1354# clipboard_max_size 64 1355 1356#: The maximum size (in MB) of data from programs running in kitty 1357#: that will be stored for writing to the system clipboard. A value of 1358#: zero means no size limit is applied. See also clipboard_control. 1359 1360# file_transfer_confirmation_bypass 1361 1362#: The password that can be supplied to the file transfer kitten 1363#: <https://sw.kovidgoyal.net/kitty/kittens/transfer/> to skip the 1364#: transfer confirmation prompt. This should only be used when 1365#: initiating transfers from trusted computers, over trusted networks 1366#: or encrypted transports, as it allows any programs running on the 1367#: remote machine to read/write to the local filesystem, without 1368#: permission. 1369 1370# allow_hyperlinks yes 1371 1372#: Process hyperlink escape sequences (OSC 8). If disabled OSC 8 1373#: escape sequences are ignored. Otherwise they become clickable 1374#: links, that you can click with the mouse or by using the hints 1375#: kitten <https://sw.kovidgoyal.net/kitty/kittens/hints/>. The 1376#: special value of ask means that kitty will ask before opening the 1377#: link when clicked. 1378 1379# shell_integration enabled 1380 1381#: Enable shell integration on supported shells. This enables features 1382#: such as jumping to previous prompts, browsing the output of the 1383#: previous command in a pager, etc. on supported shells. Set to 1384#: disabled to turn off shell integration, completely. It is also 1385#: possible to disable individual features, set to a space separated 1386#: list of these values: no-rc, no-cursor, no-title, no-cwd, no- 1387#: prompt-mark, no-complete. See Shell integration 1388#: <https://sw.kovidgoyal.net/kitty/shell-integration/> for details. 1389 1390# allow_cloning ask 1391 1392#: Control whether programs running in the terminal can request new 1393#: windows to be created. The canonical example is clone-in-kitty 1394#: <https://sw.kovidgoyal.net/kitty/shell-integration/#clone-shell>. 1395#: By default, kitty will ask for permission for each clone request. 1396#: Allowing cloning unconditionally gives programs running in the 1397#: terminal (including over SSH) permission to execute arbitrary code, 1398#: as the user who is running the terminal, on the computer that the 1399#: terminal is running on. 1400 1401# clone_source_strategies venv,conda,env_var,path 1402 1403#: Control what shell code is sourced when running clone-in-kitty in 1404#: the newly cloned window. The supported strategies are: 1405 1406#: venv 1407#: Source the file $VIRTUAL_ENV/bin/activate. This is used by the 1408#: Python stdlib venv module and allows cloning venvs automatically. 1409#: conda 1410#: Run conda activate $CONDA_DEFAULT_ENV. This supports the virtual 1411#: environments created by conda. 1412#: env_var 1413#: Execute the contents of the environment variable 1414#: KITTY_CLONE_SOURCE_CODE with eval. 1415#: path 1416#: Source the file pointed to by the environment variable 1417#: KITTY_CLONE_SOURCE_PATH. 1418 1419#: This option must be a comma separated list of the above values. 1420#: This only source the first valid one in the above order. 1421 1422# term xterm-kitty 1423 1424#: The value of the TERM environment variable to set. Changing this 1425#: can break many terminal programs, only change it if you know what 1426#: you are doing, not because you read some advice on "Stack Overflow" 1427#: to change it. The TERM variable is used by various programs to get 1428#: information about the capabilities and behavior of the terminal. If 1429#: you change it, depending on what programs you run, and how 1430#: different the terminal you are changing it to is, various things 1431#: from key-presses, to colors, to various advanced features may not 1432#: work. Changing this option by reloading the config will only affect 1433#: newly created windows. 1434 1435#: }}} 1436 1437#: OS specific tweaks {{{ 1438 1439wayland_titlebar_color background 1440 1441#: The color of the kitty window's titlebar on Wayland systems with 1442#: client side window decorations such as GNOME. A value of system 1443#: means to use the default system color, a value of background means 1444#: to use the background color of the currently active window and 1445#: finally you can use an arbitrary color, such as #12af59 or red. 1446 1447macos_titlebar_color system 1448 1449#: The color of the kitty window's titlebar on macOS. A value of 1450#: system means to use the default system color, light or dark can 1451#: also be used to set it explicitly. A value of background means to 1452#: use the background color of the currently active window and finally 1453#: you can use an arbitrary color, such as #12af59 or red. WARNING: 1454#: This option works by using a hack when arbitrary color (or 1455#: background) is configured, as there is no proper Cocoa API for it. 1456#: It sets the background color of the entire window and makes the 1457#: titlebar transparent. As such it is incompatible with 1458#: background_opacity. If you want to use both, you are probably 1459#: better off just hiding the titlebar with hide_window_decorations. 1460 1461# macos_option_as_alt no 1462 1463#: Use the Option key as an Alt key on macOS. With this set to no, 1464#: kitty will use the macOS native Option+Key to enter Unicode 1465#: character behavior. This will break any Alt+Key keyboard shortcuts 1466#: in your terminal programs, but you can use the macOS Unicode input 1467#: technique. You can use the values: left, right or both to use only 1468#: the left, right or both Option keys as Alt, instead. Note that 1469#: kitty itself always treats Option the same as Alt. This means you 1470#: cannot use this option to configure different kitty shortcuts for 1471#: Option+Key vs. Alt+Key. Also, any kitty shortcuts using 1472#: Option/Alt+Key will take priority, so that any such key presses 1473#: will not be passed to terminal programs running inside kitty. 1474#: Changing this option by reloading the config is not supported. 1475 1476# macos_hide_from_tasks no 1477 1478#: Hide the kitty window from running tasks on macOS (⌘+Tab and the 1479#: Dock). Changing this option by reloading the config is not 1480#: supported. 1481 1482# macos_quit_when_last_window_closed no 1483 1484#: Have kitty quit when all the top-level windows are closed on macOS. 1485#: By default, kitty will stay running, even with no open windows, as 1486#: is the expected behavior on macOS. 1487 1488# macos_window_resizable yes 1489 1490#: Disable this if you want kitty top-level OS windows to not be 1491#: resizable on macOS. Changing this option by reloading the config 1492#: will only affect newly created OS windows. 1493 1494# macos_thicken_font 0 1495 1496#: Draw an extra border around the font with the given width, to 1497#: increase legibility at small font sizes on macOS. For example, a 1498#: value of 0.75 will result in rendering that looks similar to sub- 1499#: pixel antialiasing at common font sizes. 1500 1501# macos_traditional_fullscreen no 1502 1503#: Use the macOS traditional full-screen transition, that is faster, 1504#: but less pretty. 1505 1506# macos_show_window_title_in all 1507 1508#: Control where the window title is displayed on macOS. A value of 1509#: window will show the title of the currently active window at the 1510#: top of the macOS window. A value of menubar will show the title of 1511#: the currently active window in the macOS global menu bar, making 1512#: use of otherwise wasted space. A value of all will show the title 1513#: in both places, and none hides the title. See 1514#: macos_menubar_title_max_length for how to control the length of the 1515#: title in the menu bar. 1516 1517# macos_menubar_title_max_length 0 1518 1519#: The maximum number of characters from the window title to show in 1520#: the macOS global menu bar. Values less than one means that there is 1521#: no maximum limit. 1522 1523# macos_custom_beam_cursor no 1524 1525#: Use a custom mouse cursor for macOS that is easier to see on both 1526#: light and dark backgrounds. Nowadays, the default macOS cursor 1527#: already comes with a white border. WARNING: this might make your 1528#: mouse cursor invisible on dual GPU machines. Changing this option 1529#: by reloading the config is not supported. 1530 1531# macos_colorspace srgb 1532 1533#: The colorspace in which to interpret terminal colors. The default 1534#: of srgb will cause colors to match those seen in web browsers. The 1535#: value of default will use whatever the native colorspace of the 1536#: display is. The value of displayp3 will use Apple's special 1537#: snowflake display P3 color space, which will result in over 1538#: saturated (brighter) colors with some color shift. Reloading 1539#: configuration will change this value only for newly created OS 1540#: windows. 1541 1542# linux_display_server auto 1543 1544#: Choose between Wayland and X11 backends. By default, an appropriate 1545#: backend based on the system state is chosen automatically. Set it 1546#: to x11 or wayland to force the choice. Changing this option by 1547#: reloading the config is not supported. 1548 1549#: }}} 1550 1551#: Keyboard shortcuts {{{ 1552 1553#: Keys are identified simply by their lowercase Unicode characters. 1554#: For example: a for the A key, [ for the left square bracket key, 1555#: etc. For functional keys, such as Enter or Escape, the names are 1556#: present at Functional key definitions 1557#: <https://sw.kovidgoyal.net/kitty/keyboard-protocol/#functional>. 1558#: For modifier keys, the names are ctrl (control, ⌃), shift (⇧), alt 1559#: (opt, option, ⌥), super (cmd, command, ⌘). See also: GLFW mods 1560#: <https://www.glfw.org/docs/latest/group__mods.html> 1561 1562#: On Linux you can also use XKB key names to bind keys that are not 1563#: supported by GLFW. See XKB keys 1564#: <https://github.com/xkbcommon/libxkbcommon/blob/master/include/xkbcommon/xkbcommon- 1565#: keysyms.h> for a list of key names. The name to use is the part 1566#: after the XKB_KEY_ prefix. Note that you can only use an XKB key 1567#: name for keys that are not known as GLFW keys. 1568 1569#: Finally, you can use raw system key codes to map keys, again only 1570#: for keys that are not known as GLFW keys. To see the system key 1571#: code for a key, start kitty with the kitty --debug-input option, 1572#: kitty will output some debug text for every key event. In that text 1573#: look for native_code, the value of that becomes the key name in the 1574#: shortcut. For example: 1575 1576#: .. code-block:: none 1577 1578#: on_key_input: glfw key: 0x61 native_code: 0x61 action: PRESS mods: none text: 'a' 1579 1580#: Here, the key name for the A key is 0x61 and you can use it with:: 1581 1582#: map ctrl+0x61 something 1583 1584#: to map Ctrl+A to something. 1585 1586#: You can use the special action no_op to unmap a keyboard shortcut 1587#: that is assigned in the default configuration:: 1588 1589#: map kitty_mod+space no_op 1590 1591#: If you would like kitty to completely ignore a key event, not even 1592#: sending it to the program running in the terminal, map it to 1593#: discard_event:: 1594 1595#: map kitty_mod+f1 discard_event 1596 1597#: You can combine multiple actions to be triggered by a single 1598#: shortcut with combine action, using the syntax below:: 1599 1600#: map key combine <separator> action1 <separator> action2 <separator> action3 ... 1601 1602#: For example:: 1603 1604#: map kitty_mod+e combine : new_window : next_layout 1605 1606#: This will create a new window and switch to the next available 1607#: layout. 1608 1609#: You can use multi-key shortcuts with the syntax shown below:: 1610 1611#: map key1>key2>key3 action 1612 1613#: For example:: 1614 1615#: map ctrl+f>2 set_font_size 20 1616 1617#: The full list of actions that can be mapped to key presses is 1618#: available here <https://sw.kovidgoyal.net/kitty/actions/>. 1619 1620# kitty_mod ctrl+shift 1621 1622#: Special modifier key alias for default shortcuts. You can change 1623#: the value of this option to alter all default shortcuts that use 1624#: kitty_mod. 1625 1626# clear_all_shortcuts no 1627 1628#: Remove all shortcut definitions up to this point. Useful, for 1629#: instance, to remove the default shortcuts. 1630 1631# action_alias 1632 1633#: E.g. action_alias launch_tab launch --type=tab --cwd=current 1634 1635#: Define action aliases to avoid repeating the same options in 1636#: multiple mappings. Aliases can be defined for any action and will 1637#: be expanded recursively. For example, the above alias allows you to 1638#: create mappings to launch a new tab in the current working 1639#: directory without duplication:: 1640 1641#: map f1 launch_tab vim 1642#: map f2 launch_tab emacs 1643 1644#: Similarly, to alias kitten invocation:: 1645 1646#: action_alias hints kitten hints --hints-offset=0 1647 1648# kitten_alias 1649 1650#: E.g. kitten_alias hints hints --hints-offset=0 1651 1652#: Like action_alias above, but specifically for kittens. Generally, 1653#: prefer to use action_alias. This option is a legacy version, 1654#: present for backwards compatibility. It causes all invocations of 1655#: the aliased kitten to be substituted. So the example above will 1656#: cause all invocations of the hints kitten to have the --hints- 1657#: offset=0 option applied. 1658 1659#: Clipboard {{{ 1660 1661#: Copy to clipboard 1662 1663# map kitty_mod+c copy_to_clipboard 1664# map cmd+c copy_to_clipboard 1665 1666#:: There is also a copy_or_interrupt action that can be optionally 1667#:: mapped to Ctrl+C. It will copy only if there is a selection and 1668#:: send an interrupt otherwise. Similarly, 1669#:: copy_and_clear_or_interrupt will copy and clear the selection or 1670#:: send an interrupt if there is no selection. 1671 1672#: Paste from clipboard 1673 1674# map kitty_mod+v paste_from_clipboard 1675# map cmd+v paste_from_clipboard 1676 1677#: Paste from selection 1678 1679# map kitty_mod+s paste_from_selection 1680# map shift+insert paste_from_selection 1681 1682#: Pass selection to program 1683 1684# map kitty_mod+o pass_selection_to_program 1685 1686#:: You can also pass the contents of the current selection to any 1687#:: program with pass_selection_to_program. By default, the system's 1688#:: open program is used, but you can specify your own, the selection 1689#:: will be passed as a command line argument to the program. For 1690#:: example:: 1691 1692#:: map kitty_mod+o pass_selection_to_program firefox 1693 1694#:: You can pass the current selection to a terminal program running 1695#:: in a new kitty window, by using the @selection placeholder:: 1696 1697#:: map kitty_mod+y new_window less @selection 1698 1699#: }}} 1700 1701#: Scrolling {{{ 1702 1703#: Scroll line up 1704 1705# map kitty_mod+up scroll_line_up 1706# map kitty_mod+k scroll_line_up 1707# map opt+cmd+page_up scroll_line_up 1708# map cmd+up scroll_line_up 1709 1710#: Scroll line down 1711 1712# map kitty_mod+down scroll_line_down 1713# map kitty_mod+j scroll_line_down 1714# map opt+cmd+page_down scroll_line_down 1715# map cmd+down scroll_line_down 1716 1717#: Scroll page up 1718 1719# map kitty_mod+page_up scroll_page_up 1720# map cmd+page_up scroll_page_up 1721 1722#: Scroll page down 1723 1724# map kitty_mod+page_down scroll_page_down 1725# map cmd+page_down scroll_page_down 1726 1727#: Scroll to top 1728 1729# map kitty_mod+home scroll_home 1730# map cmd+home scroll_home 1731 1732#: Scroll to bottom 1733 1734# map kitty_mod+end scroll_end 1735# map cmd+end scroll_end 1736 1737#: Scroll to previous shell prompt 1738 1739# map kitty_mod+z scroll_to_prompt -1 1740 1741#:: Use a parameter of 0 for scroll_to_prompt to scroll to the last 1742#:: jumped to or the last clicked position. Requires shell 1743#:: integration <https://sw.kovidgoyal.net/kitty/shell-integration/> 1744#:: to work. 1745 1746#: Scroll to next shell prompt 1747 1748# map kitty_mod+x scroll_to_prompt 1 1749 1750#: Browse scrollback buffer in pager 1751 1752# map kitty_mod+h show_scrollback 1753 1754#:: You can pipe the contents of the current screen and history 1755#:: buffer as STDIN to an arbitrary program using launch --stdin- 1756#:: source. For example, the following opens the scrollback buffer in 1757#:: less in an overlay window:: 1758 1759#:: map f1 launch --stdin-source=@screen_scrollback --stdin-add-formatting --type=overlay less +G -R 1760 1761#:: For more details on piping screen and buffer contents to external 1762#:: programs, see launch <https://sw.kovidgoyal.net/kitty/launch/>. 1763 1764#: Browse output of the last shell command in pager 1765 1766# map kitty_mod+g show_last_command_output 1767 1768#:: You can also define additional shortcuts to get the command 1769#:: output. For example, to get the first command output on screen:: 1770 1771#:: map f1 show_first_command_output_on_screen 1772 1773#:: To get the command output that was last accessed by a keyboard 1774#:: action or mouse action:: 1775 1776#:: map f1 show_last_visited_command_output 1777 1778#:: You can pipe the output of the last command run in the shell 1779#:: using the launch action. For example, the following opens the 1780#:: output in less in an overlay window:: 1781 1782#:: map f1 launch --stdin-source=@last_cmd_output --stdin-add-formatting --type=overlay less +G -R 1783 1784#:: To get the output of the first command on the screen, use 1785#:: @first_cmd_output_on_screen. To get the output of the last jumped 1786#:: to command, use @last_visited_cmd_output. 1787 1788#:: Requires shell integration 1789#:: <https://sw.kovidgoyal.net/kitty/shell-integration/> to work. 1790 1791#: }}} 1792 1793#: Window management {{{ 1794 1795#: New window 1796 1797# map kitty_mod+enter new_window 1798# map cmd+enter new_window 1799 1800#:: You can open a new kitty window running an arbitrary program, for 1801#:: example:: 1802 1803#:: map kitty_mod+y launch mutt 1804 1805#:: You can open a new window with the current working directory set 1806#:: to the working directory of the current window using:: 1807 1808#:: map ctrl+alt+enter launch --cwd=current 1809 1810#:: You can open a new window that is allowed to control kitty via 1811#:: the kitty remote control facility with launch --allow-remote- 1812#:: control. Any programs running in that window will be allowed to 1813#:: control kitty. For example:: 1814 1815#:: map ctrl+enter launch --allow-remote-control some_program 1816 1817#:: You can open a new window next to the currently active window or 1818#:: as the first window, with:: 1819 1820#:: map ctrl+n launch --location=neighbor 1821#:: map ctrl+f launch --location=first 1822 1823#:: For more details, see launch 1824#:: <https://sw.kovidgoyal.net/kitty/launch/>. 1825 1826#: New OS window 1827 1828# map kitty_mod+n new_os_window 1829# map cmd+n new_os_window 1830 1831#:: Works like new_window above, except that it opens a top-level OS 1832#:: window. In particular you can use new_os_window_with_cwd to open 1833#:: a window with the current working directory. 1834 1835#: Close window 1836 1837# map kitty_mod+w close_window 1838# map shift+cmd+d close_window 1839 1840#: Next window 1841 1842# map kitty_mod+] next_window 1843 1844#: Previous window 1845 1846# map kitty_mod+[ previous_window 1847 1848#: Move window forward 1849 1850# map kitty_mod+f move_window_forward 1851 1852#: Move window backward 1853 1854# map kitty_mod+b move_window_backward 1855 1856#: Move window to top 1857 1858# map kitty_mod+` move_window_to_top 1859 1860#: Start resizing window 1861 1862# map kitty_mod+r start_resizing_window 1863# map cmd+r start_resizing_window 1864 1865#: First window 1866 1867# map kitty_mod+1 first_window 1868# map cmd+1 first_window 1869 1870#: Second window 1871 1872# map kitty_mod+2 second_window 1873# map cmd+2 second_window 1874 1875#: Third window 1876 1877# map kitty_mod+3 third_window 1878# map cmd+3 third_window 1879 1880#: Fourth window 1881 1882# map kitty_mod+4 fourth_window 1883# map cmd+4 fourth_window 1884 1885#: Fifth window 1886 1887# map kitty_mod+5 fifth_window 1888# map cmd+5 fifth_window 1889 1890#: Sixth window 1891 1892# map kitty_mod+6 sixth_window 1893# map cmd+6 sixth_window 1894 1895#: Seventh window 1896 1897# map kitty_mod+7 seventh_window 1898# map cmd+7 seventh_window 1899 1900#: Eight window 1901 1902# map kitty_mod+8 eighth_window 1903# map cmd+8 eighth_window 1904 1905#: Ninth window 1906 1907# map kitty_mod+9 ninth_window 1908# map cmd+9 ninth_window 1909 1910#: Tenth window 1911 1912# map kitty_mod+0 tenth_window 1913 1914#: Visually select and focus window 1915 1916# map kitty_mod+f7 focus_visible_window 1917 1918#:: Display overlay numbers and alphabets on the window, and switch 1919#:: the focus to the window when you press the key. When there are 1920#:: only two windows, the focus will be switched directly without 1921#:: displaying the overlay. You can change the overlay characters and 1922#:: their order with option visual_window_select_characters. 1923 1924#: Visually swap window with another 1925 1926# map kitty_mod+f8 swap_with_window 1927 1928#:: Works like focus_visible_window above, but swaps the window. 1929 1930#: }}} 1931 1932#: Tab management {{{ 1933 1934#: Next tab 1935 1936# map kitty_mod+right next_tab 1937# map shift+cmd+] next_tab 1938# map ctrl+tab next_tab 1939 1940#: Previous tab 1941 1942# map kitty_mod+left previous_tab 1943# map shift+cmd+[ previous_tab 1944# map ctrl+shift+tab previous_tab 1945 1946#: New tab 1947 1948# map kitty_mod+t new_tab 1949# map cmd+t new_tab 1950 1951#: Close tab 1952 1953# map kitty_mod+q close_tab 1954# map cmd+w close_tab 1955 1956#: Close OS window 1957 1958# map shift+cmd+w close_os_window 1959 1960#: Move tab forward 1961 1962# map kitty_mod+. move_tab_forward 1963 1964#: Move tab backward 1965 1966# map kitty_mod+, move_tab_backward 1967 1968#: Set tab title 1969 1970# map kitty_mod+alt+t set_tab_title 1971# map shift+cmd+i set_tab_title 1972 1973 1974#: You can also create shortcuts to go to specific tabs, with 1 being 1975#: the first tab, 2 the second tab and -1 being the previously active 1976#: tab, and any number larger than the last tab being the last tab:: 1977 1978#: map ctrl+alt+1 goto_tab 1 1979#: map ctrl+alt+2 goto_tab 2 1980 1981#: Just as with new_window above, you can also pass the name of 1982#: arbitrary commands to run when using new_tab and new_tab_with_cwd. 1983#: Finally, if you want the new tab to open next to the current tab 1984#: rather than at the end of the tabs list, use:: 1985 1986#: map ctrl+t new_tab !neighbor [optional cmd to run] 1987#: }}} 1988 1989#: Layout management {{{ 1990 1991#: Next layout 1992 1993# map kitty_mod+l next_layout 1994 1995 1996#: You can also create shortcuts to switch to specific layouts:: 1997 1998#: map ctrl+alt+t goto_layout tall 1999#: map ctrl+alt+s goto_layout stack 2000 2001#: Similarly, to switch back to the previous layout:: 2002 2003#: map ctrl+alt+p last_used_layout 2004 2005#: There is also a toggle_layout action that switches to the named 2006#: layout or back to the previous layout if in the named layout. 2007#: Useful to temporarily "zoom" the active window by switching to the 2008#: stack layout:: 2009 2010#: map ctrl+alt+z toggle_layout stack 2011#: }}} 2012 2013#: Font sizes {{{ 2014 2015#: You can change the font size for all top-level kitty OS windows at 2016#: a time or only the current one. 2017 2018#: Increase font size 2019 2020# map kitty_mod+equal change_font_size all +2.0 2021# map kitty_mod+plus change_font_size all +2.0 2022# map kitty_mod+kp_add change_font_size all +2.0 2023# map cmd+plus change_font_size all +2.0 2024# map cmd+equal change_font_size all +2.0 2025# map shift+cmd+equal change_font_size all +2.0 2026 2027#: Decrease font size 2028 2029# map kitty_mod+minus change_font_size all -2.0 2030# map kitty_mod+kp_subtract change_font_size all -2.0 2031# map cmd+minus change_font_size all -2.0 2032# map shift+cmd+minus change_font_size all -2.0 2033 2034#: Reset font size 2035 2036# map kitty_mod+backspace change_font_size all 0 2037# map cmd+0 change_font_size all 0 2038 2039 2040#: To setup shortcuts for specific font sizes:: 2041 2042#: map kitty_mod+f6 change_font_size all 10.0 2043 2044#: To setup shortcuts to change only the current OS window's font 2045#: size:: 2046 2047#: map kitty_mod+f6 change_font_size current 10.0 2048#: }}} 2049 2050#: Select and act on visible text {{{ 2051 2052#: Use the hints kitten to select text and either pass it to an 2053#: external program or insert it into the terminal or copy it to the 2054#: clipboard. 2055 2056#: Open URL 2057 2058# map kitty_mod+e open_url_with_hints 2059 2060#:: Open a currently visible URL using the keyboard. The program used 2061#:: to open the URL is specified in open_url_with. 2062 2063#: Insert selected path 2064 2065# map kitty_mod+p>f kitten hints --type path --program - 2066 2067#:: Select a path/filename and insert it into the terminal. Useful, 2068#:: for instance to run git commands on a filename output from a 2069#:: previous git command. 2070 2071#: Open selected path 2072 2073# map kitty_mod+p>shift+f kitten hints --type path 2074 2075#:: Select a path/filename and open it with the default open program. 2076 2077#: Insert selected line 2078 2079# map kitty_mod+p>l kitten hints --type line --program - 2080 2081#:: Select a line of text and insert it into the terminal. Useful for 2082#:: the output of things like: `ls -1`. 2083 2084#: Insert selected word 2085 2086# map kitty_mod+p>w kitten hints --type word --program - 2087 2088#:: Select words and insert into terminal. 2089 2090#: Insert selected hash 2091 2092# map kitty_mod+p>h kitten hints --type hash --program - 2093 2094#:: Select something that looks like a hash and insert it into the 2095#:: terminal. Useful with git, which uses SHA1 hashes to identify 2096#:: commits. 2097 2098#: Open the selected file at the selected line 2099 2100# map kitty_mod+p>n kitten hints --type linenum 2101 2102#:: Select something that looks like filename:linenum and open it in 2103#:: vim at the specified line number. 2104 2105#: Open the selected hyperlink 2106 2107# map kitty_mod+p>y kitten hints --type hyperlink 2108 2109#:: Select a hyperlink (i.e. a URL that has been marked as such by 2110#:: the terminal program, for example, by `ls --hyperlink=auto`). 2111 2112 2113#: The hints kitten has many more modes of operation that you can map 2114#: to different shortcuts. For a full description see hints kitten 2115#: <https://sw.kovidgoyal.net/kitty/kittens/hints/>. 2116#: }}} 2117 2118#: Miscellaneous {{{ 2119 2120#: Show documentation 2121 2122# map kitty_mod+f1 show_kitty_doc overview 2123 2124#: Toggle fullscreen 2125 2126# map kitty_mod+f11 toggle_fullscreen 2127# map ctrl+cmd+f toggle_fullscreen 2128 2129#: Toggle maximized 2130 2131# map kitty_mod+f10 toggle_maximized 2132 2133#: Toggle macOS secure keyboard entry 2134 2135# map opt+cmd+s toggle_macos_secure_keyboard_entry 2136 2137#: Unicode input 2138 2139# map kitty_mod+u kitten unicode_input 2140# map ctrl+cmd+space kitten unicode_input 2141 2142#: Edit config file 2143 2144# map kitty_mod+f2 edit_config_file 2145# map cmd+, edit_config_file 2146 2147#: Open the kitty command shell 2148 2149# map kitty_mod+escape kitty_shell window 2150 2151#:: Open the kitty shell in a new window / tab / overlay / os_window 2152#:: to control kitty using commands. 2153 2154#: Increase background opacity 2155 2156# map kitty_mod+a>m set_background_opacity +0.1 2157 2158#: Decrease background opacity 2159 2160# map kitty_mod+a>l set_background_opacity -0.1 2161 2162#: Make background fully opaque 2163 2164# map kitty_mod+a>1 set_background_opacity 1 2165 2166#: Reset background opacity 2167 2168# map kitty_mod+a>d set_background_opacity default 2169 2170#: Reset the terminal 2171 2172# map kitty_mod+delete clear_terminal reset active 2173# map opt+cmd+r clear_terminal reset active 2174 2175#:: You can create shortcuts to clear/reset the terminal. For 2176#:: example:: 2177 2178#:: # Reset the terminal 2179#:: map f1 clear_terminal reset active 2180#:: # Clear the terminal screen by erasing all contents 2181#:: map f1 clear_terminal clear active 2182#:: # Clear the terminal scrollback by erasing it 2183#:: map f1 clear_terminal scrollback active 2184#:: # Scroll the contents of the screen into the scrollback 2185#:: map f1 clear_terminal scroll active 2186#:: # Clear everything up to the line with the cursor 2187#:: map f1 clear_terminal to_cursor active 2188 2189#:: If you want to operate on all kitty windows instead of just the 2190#:: current one, use all instead of active. 2191 2192#:: It is also possible to remap Ctrl+L to both scroll the current 2193#:: screen contents into the scrollback buffer and clear the screen, 2194#:: instead of just clearing the screen, for example, for ZSH add the 2195#:: following to ~/.zshrc: 2196 2197#:: .. code-block:: zsh 2198 2199#:: scroll-and-clear-screen() { 2200#:: printf '\n%.0s' {1..$LINES} 2201#:: zle clear-screen 2202#:: } 2203#:: zle -N scroll-and-clear-screen 2204#:: bindkey '^l' scroll-and-clear-screen 2205 2206#: Clear up to cursor line 2207 2208# map cmd+k clear_terminal to_cursor active 2209 2210#: Reload kitty.conf 2211 2212# map kitty_mod+f5 load_config_file 2213# map ctrl+cmd+, load_config_file 2214 2215#:: Reload kitty.conf, applying any changes since the last time it 2216#:: was loaded. Note that a handful of options cannot be dynamically 2217#:: changed and require a full restart of kitty. Particularly, when 2218#:: changing shortcuts for actions located on the macOS global menu 2219#:: bar, a full restart is needed. You can also map a keybinding to 2220#:: load a different config file, for example:: 2221 2222#:: map f5 load_config /path/to/alternative/kitty.conf 2223 2224#:: Note that all options from the original kitty.conf are discarded, 2225#:: in other words the new configuration *replace* the old ones. 2226 2227#: Debug kitty configuration 2228 2229# map kitty_mod+f6 debug_config 2230# map opt+cmd+, debug_config 2231 2232#:: Show details about exactly what configuration kitty is running 2233#:: with and its host environment. Useful for debugging issues. 2234 2235#: Send arbitrary text on key presses 2236 2237#:: E.g. map ctrl+shift+alt+h send_text all Hello World 2238 2239#:: You can tell kitty to send arbitrary (UTF-8) encoded text to the 2240#:: client program when pressing specified shortcut keys. For 2241#:: example:: 2242 2243#:: map ctrl+alt+a send_text all Special text 2244 2245#:: This will send "Special text" when you press the Ctrl+Alt+A key 2246#:: combination. The text to be sent is a python string literal so 2247#:: you can use escapes like \x1b to send control codes or \u21fb to 2248#:: send Unicode characters (or you can just input the Unicode 2249#:: characters directly as UTF-8 text). You can use `kitty +kitten 2250#:: show_key` to get the key escape codes you want to emulate. 2251 2252#:: The first argument to send_text is the keyboard modes in which to 2253#:: activate the shortcut. The possible values are normal, 2254#:: application, kitty or a comma separated combination of them. The 2255#:: modes normal and application refer to the DECCKM cursor key mode 2256#:: for terminals, and kitty refers to the kitty extended keyboard 2257#:: protocol. The special value all means all of them. 2258 2259#:: Some more examples:: 2260 2261#:: # Output a word and move the cursor to the start of the line (like typing and pressing Home) 2262#:: map ctrl+alt+a send_text normal Word\x1b[H 2263#:: map ctrl+alt+a send_text application Word\x1bOH 2264#:: # Run a command at a shell prompt (like typing the command and pressing Enter) 2265#:: map ctrl+alt+a send_text normal,application some command with arguments\r 2266 2267#: Open kitty Website 2268 2269# map shift+cmd+/ open_url https://sw.kovidgoyal.net/kitty/ 2270 2271#: }}} 2272 2273#: }}}