1#!/usr/local/bin/python3.8 2# vim:fileencoding=utf-8 3# License: GPLv3 Copyright: 2021, Kovid Goyal <kovid at kovidgoyal.net> 4 5# After editing this file run ./gen-config.py to apply the changes 6 7from kitty.conf.types import Action, Definition 8 9 10definition = Definition( 11 'kitty', 12 Action('map', 'parse_map', {'keymap': 'KeyMap', 'sequence_map': 'SequenceMap'}, 13 ['KeyDefinition', 'kitty.conf.utils.KeyAction', 'kitty.types.SingleKey']), 14 Action('mouse_map', 'parse_mouse_map', {'mousemap': 'MouseMap'}, ['MouseMapping', 'kitty.conf.utils.KeyAction']), 15 has_color_table=True, 16) 17definition.add_deprecation('deprecated_hide_window_decorations_aliases', 'x11_hide_window_decorations', 'macos_hide_titlebar') 18definition.add_deprecation('deprecated_macos_show_window_title_in_menubar_alias', 'macos_show_window_title_in_menubar') 19definition.add_deprecation('deprecated_send_text', 'send_text') 20 21agr = definition.add_group 22egr = definition.end_group 23opt = definition.add_option 24map = definition.add_map 25mma = definition.add_mouse_map 26 27# fonts {{{ 28agr('fonts', 'Fonts', ''' 29kitty has very powerful font management. You can configure individual font faces 30and even specify special fonts for particular characters. 31''') 32 33opt('font_family', 'monospace', 34 long_text=''' 35You can specify different fonts for the bold/italic/bold-italic variants. 36To get a full list of supported fonts use the `kitty list-fonts` command. 37By default they are derived automatically, by the OSes font system. Setting 38them manually is useful for font families that have many weight variants like 39Book, Medium, Thick, etc. For example:: 40 41 font_family Operator Mono Book 42 bold_font Operator Mono Medium 43 italic_font Operator Mono Book Italic 44 bold_italic_font Operator Mono Medium Italic 45''' 46 ) 47 48opt('bold_font', 'auto', 49 ) 50 51opt('italic_font', 'auto', 52 ) 53 54opt('bold_italic_font', 'auto', 55 ) 56 57opt('font_size', '11.0', 58 option_type='to_font_size', ctype='double', 59 long_text='Font size (in pts)' 60 ) 61 62opt('force_ltr', 'no', 63 option_type='to_bool', ctype='bool', 64 long_text=''' 65kitty does not support BIDI (bidirectional text), however, for RTL scripts, 66words are automatically displayed in RTL. That is to say, in an RTL script, the 67words "HELLO WORLD" display in kitty as "WORLD HELLO", and if you try to select 68a substring of an RTL-shaped string, you will get the character that would be 69there had the the string been LTR. For example, assuming the Hebrew word 70ירושלים, selecting the character that on the screen appears to be ם actually 71writes into the selection buffer the character י. kitty's default behavior is 72useful in conjunction with a filter to reverse the word order, however, if you 73wish to manipulate RTL glyphs, it can be very challenging to work with, so this 74option is provided to turn it off. Furthermore, this option can be used with the 75command line program :link:`GNU FriBidi 76<https://github.com/fribidi/fribidi#executable>` to get BIDI support, because it 77will force kitty to always treat the text as LTR, which FriBidi expects for 78terminals. 79''' 80 ) 81 82opt('adjust_line_height', '0', 83 option_type='adjust_line_height', ctype='!adjust_line_height', 84 long_text=''' 85Change the size of each character cell kitty renders. You can use either 86numbers, which are interpreted as pixels or percentages (number followed by %), 87which are interpreted as percentages of the unmodified values. You can use 88negative pixels or percentages less than 100% to reduce sizes (but this might 89cause rendering artifacts). 90''' 91 ) 92 93opt('adjust_column_width', '0', 94 option_type='adjust_line_height', ctype='!adjust_column_width', 95 ) 96 97opt('adjust_baseline', '0', 98 option_type='adjust_baseline', ctype='!adjust_baseline', 99 add_to_default=False, 100 long_text=''' 101Adjust the vertical alignment of text (the height in the cell at which text is 102positioned). You can use either numbers, which are interpreted as pixels or a 103percentages (number followed by %), which are interpreted as the percentage of 104the line height. A positive value moves the baseline up, and a negative value 105moves them down. The underline and strikethrough positions are adjusted 106accordingly. 107''' 108 ) 109 110opt('+symbol_map', 'U+E0A0-U+E0A3,U+E0C0-U+E0C7 PowerlineSymbols', 111 option_type='symbol_map', 112 add_to_default=False, 113 long_text=''' 114Map the specified unicode codepoints to a particular font. Useful if you need 115special rendering for some symbols, such as for Powerline. Avoids the need for 116patched fonts. Each unicode code point is specified in the form :code:`U+<code point 117in hexadecimal>`. You can specify multiple code points, separated by commas and 118ranges separated by hyphens. :code:`symbol_map` itself can be specified multiple times. 119Syntax is:: 120 121 symbol_map codepoints Font Family Name 122''' 123 ) 124 125opt('disable_ligatures', 'never', 126 option_type='disable_ligatures', ctype='int', 127 long_text=''' 128Choose how you want to handle multi-character ligatures. The default is to 129always render them. You can tell kitty to not render them when the cursor is 130over them by using :code:`cursor` to make editing easier, or have kitty never 131render them at all by using :code:`always`, if you don't like them. The ligature 132strategy can be set per-window either using the kitty remote control facility 133or by defining shortcuts for it in kitty.conf, for example:: 134 135 map alt+1 disable_ligatures_in active always 136 map alt+2 disable_ligatures_in all never 137 map alt+3 disable_ligatures_in tab cursor 138 139Note that this refers to programming ligatures, typically implemented using the 140:code:`calt` OpenType feature. For disabling general ligatures, use the 141:opt:`font_features` setting. 142''' 143 ) 144 145opt('+font_features', 'none', 146 option_type='font_features', 147 add_to_default=False, 148 long_text=''' 149Choose exactly which OpenType features to enable or disable. This is useful as 150some fonts might have features worthwhile in a terminal. For example, Fira 151Code Retina includes a discretionary feature, :code:`zero`, which in that font 152changes the appearance of the zero (0), to make it more easily distinguishable 153from Ø. Fira Code Retina also includes other discretionary features known as 154Stylistic Sets which have the tags :code:`ss01` through :code:`ss20`. 155 156For the exact syntax to use for individual features, see the 157:link:`Harfbuzz documentation 158<https://harfbuzz.github.io/harfbuzz-hb-common.html#hb-feature-from-string>`. 159 160Note that this code is indexed by PostScript name, and not the font 161family. This allows you to define very precise feature settings; e.g. you can 162disable a feature in the italic font but not in the regular font. 163 164On Linux, these are read from the FontConfig database first and then this, 165setting is applied, so they can be configured in a single, central place. 166 167To get the PostScript name for a font, use :code:`kitty + list-fonts --psnames`: 168 169.. code-block:: sh 170 171 $ kitty + list-fonts --psnames | grep Fira 172 Fira Code 173 Fira Code Bold (FiraCode-Bold) 174 Fira Code Light (FiraCode-Light) 175 Fira Code Medium (FiraCode-Medium) 176 Fira Code Regular (FiraCode-Regular) 177 Fira Code Retina (FiraCode-Retina) 178 179The part in brackets is the PostScript name. 180 181Enable alternate zero and oldstyle numerals:: 182 183 font_features FiraCode-Retina +zero +onum 184 185Enable only alternate zero:: 186 187 font_features FiraCode-Retina +zero 188 189Disable the normal ligatures, but keep the :code:`calt` feature which (in this 190font) breaks up monotony:: 191 192 font_features TT2020StyleB-Regular -liga +calt 193 194In conjunction with :opt:`force_ltr`, you may want to disable Arabic shaping 195entirely, and only look at their isolated forms if they show up in a document. 196You can do this with e.g.:: 197 198 font_features UnifontMedium +isol -medi -fina -init 199''' 200 ) 201 202opt('box_drawing_scale', '0.001, 1, 1.5, 2', 203 option_type='box_drawing_scale', 204 long_text=''' 205Change the sizes of the lines used for the box drawing unicode characters These 206values are in pts. They will be scaled by the monitor DPI to arrive at a pixel 207value. There must be four values corresponding to thin, normal, thick, and very 208thick lines. 209''' 210 ) 211egr() # }}} 212 213# cursor {{{ 214agr('cursor', 'Cursor customization') 215 216opt('cursor', '#cccccc', 217 option_type='to_color', 218 long_text='Default cursor color' 219 ) 220 221opt('cursor_text_color', '#111111', 222 option_type='cursor_text_color', 223 long_text=''' 224Choose the color of text under the cursor. If you want it rendered with the 225background color of the cell underneath instead, use the special keyword: 226background 227''' 228 ) 229 230opt('cursor_shape', 'block', 231 option_type='to_cursor_shape', ctype='int', 232 long_text='The cursor shape can be one of (block, beam, underline).' 233 ' Note that when reloading the config this will be changed only if the' 234 ' cursor shape has not been set by the program running in the terminal.' 235 ) 236 237opt('cursor_beam_thickness', '1.5', 238 option_type='positive_float', ctype='float', 239 long_text='Defines the thickness of the beam cursor (in pts)' 240 ) 241 242opt('cursor_underline_thickness', '2.0', 243 option_type='positive_float', ctype='float', 244 long_text='Defines the thickness of the underline cursor (in pts)' 245 ) 246 247opt('cursor_blink_interval', '-1', 248 option_type='float', ctype='time', 249 long_text=''' 250The interval (in seconds) at which to blink the cursor. Set to zero to disable 251blinking. Negative values mean use system default. Note that numbers smaller 252than :opt:`repaint_delay` will be limited to :opt:`repaint_delay`. 253''' 254 ) 255 256opt('cursor_stop_blinking_after', '15.0', 257 option_type='positive_float', ctype='time', 258 long_text=''' 259Stop blinking cursor after the specified number of seconds of keyboard 260inactivity. Set to zero to never stop blinking. 261''' 262 ) 263egr() # }}} 264 265# scrollback {{{ 266agr('scrollback', 'Scrollback') 267 268opt('scrollback_lines', '2000', 269 option_type='scrollback_lines', 270 long_text=''' 271Number of lines of history to keep in memory for scrolling back. Memory is 272allocated on demand. Negative numbers are (effectively) infinite scrollback. 273Note that using very large scrollback is not recommended as it can slow down 274performance of the terminal and also use large amounts of RAM. Instead, consider 275using :opt:`scrollback_pager_history_size`. Note that on config reload if this 276is changed it will only affect newly created windows, not existing ones. 277''' 278 ) 279 280opt('scrollback_pager', 'less --chop-long-lines --RAW-CONTROL-CHARS +INPUT_LINE_NUMBER', 281 option_type='to_cmdline', 282 long_text=''' 283Program with which to view scrollback in a new window. The scrollback buffer is 284passed as STDIN to this program. If you change it, make sure the program you use 285can handle ANSI escape sequences for colors and text formatting. 286INPUT_LINE_NUMBER in the command line above will be replaced by an integer 287representing which line should be at the top of the screen. Similarly 288CURSOR_LINE and CURSOR_COLUMN will be replaced by the current cursor position. 289''' 290 ) 291 292opt('scrollback_pager_history_size', '0', 293 option_type='scrollback_pager_history_size', ctype='uint', 294 long_text=''' 295Separate scrollback history size, used only for browsing the scrollback buffer 296(in MB). This separate buffer is not available for interactive scrolling but 297will be piped to the pager program when viewing scrollback buffer in a separate 298window. The current implementation stores the data in UTF-8, so approximatively 29910000 lines per megabyte at 100 chars per line, for pure ASCII text, unformatted 300text. A value of zero or less disables this feature. The maximum allowed size is 3014GB. Note that on config reload if this 302is changed it will only affect newly created windows, not existing ones. 303''' 304 ) 305 306opt('scrollback_fill_enlarged_window', 'no', 307 option_type='to_bool', ctype='bool', 308 long_text='Fill new space with lines from the scrollback buffer after enlarging a window.' 309 ) 310 311opt('wheel_scroll_multiplier', '5.0', 312 option_type='float', ctype='double', 313 long_text=''' 314Modify the amount scrolled by the mouse wheel. Note this is only used for low 315precision scrolling devices, not for high precision scrolling on platforms such 316as macOS and Wayland. Use negative numbers to change scroll direction. 317''' 318 ) 319 320opt('touch_scroll_multiplier', '1.0', 321 option_type='float', ctype='double', 322 long_text=''' 323Modify the amount scrolled by a touchpad. Note this is only used for high 324precision scrolling devices on platforms such as macOS and Wayland. Use negative 325numbers to change scroll direction. 326''' 327 ) 328egr() # }}} 329 330# mouse {{{ 331agr('mouse', 'Mouse') 332 333opt('mouse_hide_wait', '3.0', 334 macos_default="0.0", 335 option_type='float', ctype='time', 336 long_text=''' 337Hide mouse cursor after the specified number of seconds of the mouse not being 338used. Set to zero to disable mouse cursor hiding. Set to a negative value to 339hide the mouse cursor immediately when typing text. Disabled by default on macOS 340as getting it to work robustly with the ever-changing sea of bugs that is Cocoa 341is too much effort. 342''' 343 ) 344 345opt('url_color', '#0087bd', 346 option_type='to_color', ctype='color_as_int', 347 long_text=''' 348The color and style for highlighting URLs on mouse-over. :code:`url_style` can 349be one of: none, single, double, curly 350''' 351 ) 352 353opt('url_style', 'curly', 354 option_type='url_style', ctype='uint', 355 ) 356 357opt('open_url_with', 'default', 358 option_type='to_cmdline', 359 long_text=''' 360The program with which to open URLs that are clicked on. The special value 361:code:`default` means to use the operating system's default URL handler. 362''' 363 ) 364 365opt('url_prefixes', 'http https file ftp gemini irc gopher mailto news git', 366 option_type='url_prefixes', ctype='!url_prefixes', 367 long_text=''' 368The set of URL prefixes to look for when detecting a URL under the mouse cursor. 369''' 370 ) 371 372opt('detect_urls', 'yes', 373 option_type='to_bool', ctype='bool', 374 long_text=''' 375Detect URLs under the mouse. Detected URLs are highlighted with an underline and 376the mouse cursor becomes a hand over them. Even if this option is disabled, URLs 377are still clickable. 378''' 379 ) 380 381opt('url_excluded_characters', '', 382 ctype='!url_excluded_characters', 383 long_text=''' 384Additional characters to be disallowed from URLs, when detecting URLs under the 385mouse cursor. By default, all characters legal in URLs are allowed. 386''' 387 ) 388 389opt('copy_on_select', 'no', 390 option_type='copy_on_select', 391 long_text=''' 392Copy to clipboard or a private buffer on select. With this set to 393:code:`clipboard`, simply selecting text with the mouse will cause the text to 394be copied to clipboard. Useful on platforms such as macOS that do not have the 395concept of primary selections. You can instead specify a name such as :code:`a1` to 396copy to a private kitty buffer instead. Map a shortcut with the 397:code:`paste_from_buffer` action to paste from this private buffer. 398For example:: 399 400 map cmd+shift+v paste_from_buffer a1 401 402Note that copying to the clipboard is a security risk, as all programs, 403including websites open in your browser can read the contents of the 404system clipboard. 405''' 406 ) 407 408opt('strip_trailing_spaces', 'never', 409 choices=('always', 'never', 'smart'), 410 long_text=''' 411Remove spaces at the end of lines when copying to clipboard. A value of 412:code:`smart` will do it when using normal selections, but not rectangle 413selections. :code:`always` will always do it. 414''' 415 ) 416 417opt('select_by_word_characters', '@-./_~?&=%+#', 418 ctype='!select_by_word_characters', 419 long_text=''' 420Characters considered part of a word when double clicking. In addition to these 421characters any character that is marked as an alphanumeric character in the 422unicode database will be matched. 423''' 424 ) 425 426opt('click_interval', '-1.0', 427 option_type='float', ctype='time', 428 long_text=''' 429The interval between successive clicks to detect double/triple clicks (in 430seconds). Negative numbers will use the system default instead, if available, or 431fallback to 0.5. 432''' 433 ) 434 435opt('focus_follows_mouse', 'no', 436 option_type='to_bool', ctype='bool', 437 long_text=''' 438Set the active window to the window under the mouse when moving the mouse around 439''' 440 ) 441 442opt('pointer_shape_when_grabbed', 'arrow', 443 choices=('arrow', 'beam', 'hand'), ctype='pointer_shape', 444 long_text=''' 445The shape of the mouse pointer when the program running in the terminal grabs 446the mouse. Valid values are: :code:`arrow`, :code:`beam` and :code:`hand` 447''' 448 ) 449 450opt('default_pointer_shape', 'beam', 451 choices=('arrow', 'beam', 'hand'), ctype='pointer_shape', 452 long_text=''' 453The default shape of the mouse pointer. Valid values are: :code:`arrow`, 454:code:`beam` and :code:`hand` 455''' 456 ) 457 458opt('pointer_shape_when_dragging', 'beam', 459 choices=('arrow', 'beam', 'hand'), ctype='pointer_shape', 460 long_text=''' 461The default shape of the mouse pointer when dragging across text. Valid values 462are: :code:`arrow`, :code:`beam` and :code:`hand` 463''' 464 ) 465 466 467# mouse.mousemap {{{ 468agr('mouse.mousemap', 'Mouse actions', ''' 469Mouse buttons can be remapped to perform arbitrary actions. The syntax for 470doing so is: 471 472.. code-block:: none 473 474 mouse_map button-name event-type modes action 475 476Where ``button-name`` is one of ``left``, ``middle``, ``right`` or ``b1 ... b8`` 477with added keyboard modifiers, for example: ``ctrl+shift+left`` refers to holding 478the :kbd:`ctrl+shift` keys while clicking with the left mouse button. The 479number ``b1 ... b8`` can be used to refer to upto eight buttons on a mouse. 480 481``event-type`` is one ``press``, ``release``, ``doublepress``, ``triplepress``, 482``click`` and ``doubleclick``. ``modes`` indicates whether the action is 483performed when the mouse is grabbed by the program running in the terminal, or 484not. It can have one or more or the values, ``grabbed,ungrabbed``. ``grabbed`` 485refers to when the program running in the terminal has requested mouse events. 486Note that the click and double click events have a delay of 487:opt:`click_interval` to disambiguate from double and triple presses. 488 489You can run kitty with the :option:`kitty --debug-input` command line option 490to see mouse events. See the builtin actions below to get a sense of what is possible. 491 492If you want to unmap an action map it to ``no-op``. For example, to disable opening 493of URLs with a plain click:: 494 495 mouse_map left click ungrabbed no-op 496 497.. note:: 498 Once a selection is started, releasing the button that started it will 499 automatically end it and no release event will be dispatched. 500''') 501 502opt('clear_all_mouse_actions', 'no', 503 option_type='clear_all_mouse_actions', 504 long_text=''' 505You can have kitty remove all mouse actions seen up to this point. 506Useful, for instance, to remove the default mouse actions. 507''' 508 ) 509 510mma('Click the link under the mouse cursor when no selection is created', 511 'click_url_or_select left click ungrabbed mouse_click_url_or_select', 512 ) 513 514mma('Click the link under the mouse cursor when no selection is created even if grabbed', 515 'click_url_or_select_grabbed shift+left click grabbed,ungrabbed mouse_click_url_or_select', 516 ) 517 518mma('Click the link under the mouse cursor', 519 'click_url ctrl+shift+left release grabbed,ungrabbed mouse_click_url', 520 long_text='Variant with :kbd:`ctrl+shift` is present because the simple' 521 ' click based version has an unavoidable delay of :opt:`click_interval`, to disambiguate clicks from double clicks.' 522 ) 523 524mma('Discard press event for link click', 525 'click_url_discard ctrl+shift+left press grabbed discard_event', 526 long_text='Prevent this press event from being sent to the program that has' 527 ' grabbed the mouse, as the corresponding release event is used to open a URL.' 528 ) 529 530 531mma('Paste from the primary selection', 532 'paste_selection middle release ungrabbed paste_from_selection', 533 ) 534 535mma('Start selecting text', 536 'start_simple_selection left press ungrabbed mouse_selection normal', 537 ) 538 539mma('Start selecting text in a rectangle', 540 'start_rectangle_selection ctrl+alt+left press ungrabbed mouse_selection rectangle', 541 ) 542 543mma('Select a word', 544 'select_word left doublepress ungrabbed mouse_selection word', 545 ) 546 547mma('Select a line', 548 'select_line left triplepress ungrabbed mouse_selection line', 549 long_text='Select the entire line' 550 ) 551 552mma('Select line from point', 553 'select_line_from_point ctrl+alt+left triplepress ungrabbed mouse_selection line_from_point', 554 long_text='Select from the clicked point to the end of the line' 555 ) 556 557mma('Extend the current selection', 558 'extend_selection right press ungrabbed mouse_selection extend', 559 long_text='If you want only the end of the selection to be moved instead of the nearest boundary, use move-end instead of extend.' 560 ) 561 562mma('Paste from the primary selection even when grabbed', 563 'paste_selection_grabbed shift+middle release ungrabbed,grabbed paste_selection', 564 ) 565 566mma('Discard press event for middle click paste', 567 'paste_selection_grabbed shift+middle press grabbed discard_event', 568 ) 569 570mma('Start selecting text even when grabbed', 571 'start_simple_selection_grabbed shift+left press ungrabbed,grabbed mouse_selection normal', 572 ) 573 574mma('Start selecting text in a rectangle even when grabbed', 575 'start_rectangle_selection_grabbed shift+ctrl+alt+left press ungrabbed,grabbed mouse_selection rectangle', 576 ) 577 578mma('Select a word even when grabbed', 579 'select_word_grabbed shift+left doublepress ungrabbed,grabbed mouse_selection word', 580 ) 581 582mma('Select a line even when grabbed', 583 'select_line_grabbed shift+left triplepress ungrabbed,grabbed mouse_selection line', 584 long_text='Select the entire line' 585 ) 586 587mma('Select line from point even when grabbed', 588 'select_line_from_point_grabbed shift+ctrl+alt+left triplepress ungrabbed,grabbed mouse_selection line_from_point', 589 long_text='Select from the clicked point to the end of the line' 590 ) 591 592mma('Extend the current selection even when grabbed', 593 'extend_selection_grabbed shift+right press ungrabbed,grabbed mouse_selection extend', 594 ) 595egr() # }}} 596egr() # }}} 597 598# performance {{{ 599agr('performance', 'Performance tuning') 600 601opt('repaint_delay', '10', 602 option_type='positive_int', ctype='time-ms', 603 long_text=''' 604Delay (in milliseconds) between screen updates. Decreasing it, increases frames-per-second 605(FPS) at the cost of more CPU usage. The default value yields ~100 606FPS which is more than sufficient for most uses. Note that to actually achieve 607100 FPS you have to either set :opt:`sync_to_monitor` to no or use a monitor 608with a high refresh rate. Also, to minimize latency when there is pending input 609to be processed, repaint_delay is ignored. 610''' 611 ) 612 613opt('input_delay', '3', 614 option_type='positive_int', ctype='time-ms', 615 long_text=''' 616Delay (in milliseconds) before input from the program running in the terminal is 617processed. Note that decreasing it will increase responsiveness, but also 618increase CPU usage and might cause flicker in full screen programs that redraw 619the entire screen on each loop, because kitty is so fast that partial screen 620updates will be drawn. 621''' 622 ) 623 624opt('sync_to_monitor', 'yes', 625 option_type='to_bool', ctype='bool', 626 long_text=''' 627Sync screen updates to the refresh rate of the monitor. This prevents tearing 628(https://en.wikipedia.org/wiki/Screen_tearing) when scrolling. However, it 629limits the rendering speed to the refresh rate of your monitor. With a very high 630speed mouse/high keyboard repeat rate, you may notice some slight input latency. 631If so, set this to no. 632''' 633 ) 634egr() # }}} 635 636# bell {{{ 637agr('bell', 'Terminal bell') 638 639opt('enable_audio_bell', 'yes', 640 option_type='to_bool', ctype='bool', 641 long_text='Enable/disable the audio bell. Useful in environments that require silence.' 642 ) 643 644opt('visual_bell_duration', '0.0', 645 option_type='positive_float', ctype='time', 646 long_text=''' 647Visual bell duration. Flash the screen when a bell occurs for the specified 648number of seconds. Set to zero to disable. 649''' 650 ) 651 652opt('window_alert_on_bell', 'yes', 653 option_type='to_bool', ctype='bool', 654 long_text=''' 655Request window attention on bell. Makes the dock icon bounce on macOS or the 656taskbar flash on linux. 657''' 658 ) 659 660opt('bell_on_tab', 'yes', 661 option_type='to_bool', 662 long_text=''' 663Show a bell symbol on the tab if a bell occurs in one of the windows in the tab 664and the window is not the currently focused window 665''' 666 ) 667 668opt('command_on_bell', 'none', 669 option_type='to_cmdline', 670 long_text='Program to run when a bell occurs.' 671 ' The environment variable :envvar:`KITTY_CHILD_CMDLINE` can be used to get the program running in' 672 ' the window in which the bell occurred.' 673 ) 674egr() # }}} 675 676# window {{{ 677agr('window', 'Window layout') 678 679opt('remember_window_size', 'yes', 680 option_type='to_bool', 681 long_text=''' 682If enabled, the window size will be remembered so that new instances of kitty 683will have the same size as the previous instance. If disabled, the window will 684initially have size configured by initial_window_width/height, in pixels. You 685can use a suffix of "c" on the width/height values to have them interpreted as 686number of cells instead of pixels. 687''' 688 ) 689 690opt('initial_window_width', '640', 691 option_type='window_size', 692 ) 693 694opt('initial_window_height', '400', 695 option_type='window_size', 696 ) 697 698opt('enabled_layouts', '*', 699 option_type='to_layout_names', 700 long_text=''' 701The enabled window layouts. A comma separated list of layout names. The special 702value :code:`all` means all layouts. The first listed layout will be used as the 703startup layout. Default configuration is all layouts in alphabetical order. For 704a list of available layouts, see the :ref:`layouts`. 705''' 706 ) 707 708opt('window_resize_step_cells', '2', 709 option_type='positive_int', 710 long_text=''' 711The step size (in units of cell width/cell height) to use when resizing windows. 712The cells value is used for horizontal resizing and the lines value for vertical 713resizing. 714''' 715 ) 716 717opt('window_resize_step_lines', '2', 718 option_type='positive_int', 719 ) 720 721opt('window_border_width', '0.5pt', 722 option_type='window_border_width', 723 long_text=''' 724The width of window borders. Can be either in pixels (px) or pts (pt). Values in 725pts will be rounded to the nearest number of pixels based on screen resolution. 726If not specified the unit is assumed to be pts. Note that borders are displayed 727only when more than one window is visible. They are meant to separate multiple 728windows. 729''' 730 ) 731 732opt('draw_minimal_borders', 'yes', 733 option_type='to_bool', 734 long_text=''' 735Draw only the minimum borders needed. This means that only the minimum needed 736borders for inactive windows are drawn. That is only the borders that separate 737the inactive window from a neighbor. Note that setting a non-zero window margin 738overrides this and causes all borders to be drawn. 739''' 740 ) 741 742opt('window_margin_width', '0', 743 option_type='edge_width', 744 long_text=''' 745The window margin (in pts) (blank area outside the border). A single value sets 746all four sides. Two values set the vertical and horizontal sides. Three values 747set top, horizontal and bottom. Four values set top, right, bottom and left. 748''' 749 ) 750 751opt('single_window_margin_width', '-1', 752 option_type='optional_edge_width', 753 long_text=''' 754The window margin (in pts) to use when only a single window is visible. Negative 755values will cause the value of :opt:`window_margin_width` to be used instead. A 756single value sets all four sides. Two values set the vertical and horizontal 757sides. Three values set top, horizontal and bottom. Four values set top, right, 758bottom and left. 759''' 760 ) 761 762opt('window_padding_width', '0', 763 option_type='edge_width', 764 long_text=''' 765The window padding (in pts) (blank area between the text and the window border). 766A single value sets all four sides. Two values set the vertical and horizontal 767sides. Three values set top, horizontal and bottom. Four values set top, right, 768bottom and left. 769''' 770 ) 771 772opt('placement_strategy', 'center', 773 choices=('center', 'top-left'), 774 long_text=''' 775When the window size is not an exact multiple of the cell size, the cell area of 776the terminal window will have some extra padding on the sides. You can control 777how that padding is distributed with this option. Using a value of 778:code:`center` means the cell area will be placed centrally. A value of 779:code:`top-left` means the padding will be on only the bottom and right edges. 780''' 781 ) 782 783opt('active_border_color', '#00ff00', 784 option_type='to_color_or_none', ctype='active_border_color', 785 long_text=''' 786The color for the border of the active window. Set this to none to not draw 787borders around the active window. 788''' 789 ) 790 791opt('inactive_border_color', '#cccccc', 792 option_type='to_color', ctype='color_as_int', 793 long_text='The color for the border of inactive windows' 794 ) 795 796opt('bell_border_color', '#ff5a00', 797 option_type='to_color', ctype='color_as_int', 798 long_text='The color for the border of inactive windows in which a bell has occurred' 799 ) 800 801opt('inactive_text_alpha', '1.0', 802 option_type='unit_float', ctype='float', 803 long_text=''' 804Fade the text in inactive windows by the specified amount (a number between zero 805and one, with zero being fully faded). 806''' 807 ) 808 809opt('hide_window_decorations', 'no', 810 option_type='hide_window_decorations', ctype='uint', 811 long_text=''' 812Hide the window decorations (title-bar and window borders) with :code:`yes`. On 813macOS, :code:`titlebar-only` can be used to only hide the titlebar. Whether this 814works and exactly what effect it has depends on the window manager/operating 815system. Note that the effects of changing this setting when reloading config 816are undefined. 817''' 818 ) 819 820opt('resize_debounce_time', '0.1', 821 option_type='positive_float', ctype='time', 822 long_text=''' 823The time (in seconds) to wait before redrawing the screen when a resize event is 824received. On platforms such as macOS, where the operating system sends events 825corresponding to the start and end of a resize, this number is ignored. 826''' 827 ) 828 829opt('resize_draw_strategy', 'static', 830 option_type='resize_draw_strategy', ctype='int', 831 long_text=''' 832Choose how kitty draws a window while a resize is in progress. A value of 833:code:`static` means draw the current window contents, mostly unchanged. A value 834of :code:`scale` means draw the current window contents scaled. A value of 835:code:`blank` means draw a blank window. A value of :code:`size` means show the 836window size in cells. 837''' 838 ) 839 840opt('resize_in_steps', 'no', 841 option_type='to_bool', ctype='bool', 842 long_text=''' 843Resize the OS window in steps as large as the cells, instead of with the usual 844pixel accuracy. Combined with an :opt:`initial_window_width` and 845:opt:`initial_window_height` in number of cells, this option can be used to keep 846the margins as small as possible when resizing the OS window. Note that this 847does not currently work on Wayland. 848''' 849 ) 850 851opt('confirm_os_window_close', '0', 852 option_type='positive_int', 853 long_text=''' 854Ask for confirmation when closing an OS window or a tab that has at least this 855number of kitty windows in it. A value of zero disables confirmation. This 856confirmation also applies to requests to quit the entire application (all OS 857windows, via the quit action). 858''' 859 ) 860egr() # }}} 861 862# tabbar {{{ 863agr('tabbar', 'Tab bar') 864 865opt('tab_bar_edge', 'bottom', 866 option_type='tab_bar_edge', ctype='int', 867 long_text='Which edge to show the tab bar on, top or bottom' 868 ) 869 870opt('tab_bar_margin_width', '0.0', 871 option_type='positive_float', 872 long_text='The margin to the left and right of the tab bar (in pts)' 873 ) 874 875opt('tab_bar_margin_height', '0.0 0.0', 876 option_type='tab_bar_margin_height', ctype='!tab_bar_margin_height', 877 long_text=''' 878The margin above and below the tab bar (in pts). The first number is the 879margin between the edge of the OS Window and the tab bar and the second 880number is the margin between the tab bar and the contents of the current 881tab. 882''' 883 ) 884 885 886opt('tab_bar_style', 'fade', 887 choices=('fade', 'hidden', 'powerline', 'separator', 'slant'), ctype='!tab_bar_style', 888 long_text=''' 889The tab bar style, can be one of: 890 891:code:`fade` 892 Each tab's edges fade into the background color (see :opt:`tab_fade`) 893:code:`slant` 894 Tabs look like the tabs in a physical file 895:code:`separator` 896 Tabs are separated by a configurable separator (see :opt:`tab_separator`) 897:code:`powerline` 898 Tabs are shown as a continuous line with "fancy" separators (see :opt:`tab_powerline_style`) 899:code:`hidden` 900 The tab bar is hidden. If you use this, you might want to create a mapping 901 for the :ref:`action-select_tab` action which presents you with a list 902 of tabs and allows for easy switching to a tab. 903''' 904 ) 905 906opt('tab_bar_min_tabs', '2', 907 option_type='tab_bar_min_tabs', ctype='uint', 908 long_text='The minimum number of tabs that must exist before the tab bar is shown' 909 ) 910 911opt('tab_switch_strategy', 'previous', 912 choices=('last', 'left', 'previous', 'right'), 913 long_text=''' 914The algorithm to use when switching to a tab when the current tab is closed. The 915default of :code:`previous` will switch to the last used tab. A value of 916:code:`left` will switch to the tab to the left of the closed tab. A value of 917:code:`right` will switch to the tab to the right of the closed tab. A value of 918:code:`last` will switch to the right-most tab. 919''' 920 ) 921 922opt('tab_fade', '0.25 0.5 0.75 1', 923 option_type='tab_fade', 924 long_text=''' 925Control how each tab fades into the background when using :code:`fade` for the 926:opt:`tab_bar_style`. Each number is an alpha (between zero and one) that 927controls how much the corresponding cell fades into the background, with zero 928being no fade and one being full fade. You can change the number of cells used 929by adding/removing entries to this list. 930''' 931 ) 932 933opt('tab_separator', '" ┇"', 934 option_type='tab_separator', 935 long_text=''' 936The separator between tabs in the tab bar when using :code:`separator` as the 937:opt:`tab_bar_style`. 938''' 939 ) 940 941opt('tab_powerline_style', 'angled', 942 choices=('angled', 'round', 'slanted'), 943 long_text=''' 944The powerline separator style between tabs in the tab bar when using 945:code:`powerline` as the :opt:`tab_bar_style`, can be one of: :code:`angled`, 946:code:`slanted`, or :code:`round`. 947''' 948 ) 949 950opt('tab_activity_symbol', 'none', 951 option_type='tab_activity_symbol', 952 long_text=''' 953Some text or a unicode symbol to show on the tab if a window in the tab that 954does not have focus has some activity. If you want to use leading or trailing spaces 955surround the text with quotes. 956''' 957 ) 958 959opt('tab_title_template', '"{title}"', 960 option_type='tab_title_template', 961 long_text=''' 962A template to render the tab title. The default just renders the title. If you 963wish to include the tab-index as well, use something like: :code:`{index}: 964{title}`. Useful if you have shortcuts mapped for :code:`goto_tab N`. If you 965prefer to see the index as a superscript, use {sup.index}. In 966addition you can use :code:`{layout_name}` for the current layout name, 967:code:`{num_windows}` for the number of windows in the tab and 968:code:`{num_window_groups}` for the number of window groups 969(not counting overlay windows) in the tab. Note that formatting 970is done by Python's string formatting machinery, so you can use, for instance, 971:code:`{layout_name[:2].upper()}` to show only the first two letters of the 972layout name, upper-cased. If you want to style the text, you can use styling 973directives, for example: 974:code:`{fmt.fg.red}red{fmt.fg.default}normal{fmt.bg._00FF00}green 975bg{fmt.bg.normal}`. Similarly, for bold and italic: 976:code:`{fmt.bold}bold{fmt.nobold}normal{fmt.italic}italic{fmt.noitalic}`. 977''' 978 ) 979 980opt('active_tab_title_template', 'none', 981 option_type='active_tab_title_template', 982 long_text=''' 983Template to use for active tabs, if not specified falls back to 984:opt:`tab_title_template`. 985''' 986 ) 987 988opt('active_tab_foreground', '#000', 989 option_type='to_color', 990 long_text='Tab bar colors and styles' 991 ) 992 993opt('active_tab_background', '#eee', 994 option_type='to_color', 995 ) 996 997opt('active_tab_font_style', 'bold-italic', 998 option_type='tab_font_style', 999 ) 1000 1001opt('inactive_tab_foreground', '#444', 1002 option_type='to_color', 1003 ) 1004 1005opt('inactive_tab_background', '#999', 1006 option_type='to_color', 1007 ) 1008 1009opt('inactive_tab_font_style', 'normal', 1010 option_type='tab_font_style', 1011 ) 1012 1013opt('tab_bar_background', 'none', 1014 option_type='to_color_or_none', 1015 long_text=''' 1016Background color for the tab bar. Defaults to using the terminal background 1017color. 1018''' 1019 ) 1020egr() # }}} 1021 1022# colors {{{ 1023agr('colors', 'Color scheme') 1024 1025opt('foreground', '#dddddd', 1026 option_type='to_color', ctype='color_as_int', 1027 long_text='The foreground and background colors' 1028 ) 1029 1030opt('background', '#000000', 1031 option_type='to_color', ctype='color_as_int', 1032 ) 1033 1034opt('background_opacity', '1.0', 1035 option_type='unit_float', ctype='float', 1036 long_text=''' 1037The opacity of the background. A number between 0 and 1, where 1 is opaque and 0 1038is fully transparent. This will only work if supported by the OS (for instance, 1039when using a compositor under X11). Note that it only sets the background 1040color's opacity in cells that have the same background color as the default 1041terminal background. This is so that things like the status bar in vim, 1042powerline prompts, etc. still look good. But it means that if you use a color 1043theme with a background color in your editor, it will not be rendered as 1044transparent. Instead you should change the default background color in your 1045kitty config and not use a background color in the editor color scheme. Or use 1046the escape codes to set the terminals default colors in a shell script to launch 1047your editor. Be aware that using a value less than 1.0 is a (possibly 1048significant) performance hit. If you want to dynamically change transparency of 1049windows set :opt:`dynamic_background_opacity` to :code:`yes` (this is off by 1050default as it has a performance cost). Changing this setting when reloading 1051the config will only work if :opt:`dynamic_background_opacity` was enabled 1052in the original config. 1053''' 1054 ) 1055 1056opt('background_image', 'none', 1057 option_type='config_or_absolute_path', ctype='!background_image', 1058 long_text='Path to a background image. Must be in PNG format.' 1059 ) 1060 1061opt('background_image_layout', 'tiled', 1062 choices=('mirror-tiled', 'scaled', 'tiled'), ctype='bglayout', 1063 long_text='Whether to tile or scale the background image.' 1064 ) 1065 1066opt('background_image_linear', 'no', 1067 option_type='to_bool', ctype='bool', 1068 long_text='When background image is scaled, whether linear interpolation should be used.' 1069 ) 1070 1071opt('dynamic_background_opacity', 'no', 1072 option_type='to_bool', ctype='bool', 1073 long_text=''' 1074Allow changing of the :opt:`background_opacity` dynamically, using either 1075keyboard shortcuts (:sc:`increase_background_opacity` and 1076:sc:`decrease_background_opacity`) or the remote control facility. Changing 1077this setting by reloading the config is not supported. 1078''' 1079 ) 1080 1081opt('background_tint', '0.0', 1082 option_type='unit_float', ctype='float', 1083 long_text=''' 1084How much to tint the background image by the background color. The tint is 1085applied only under the text area, not margin/borders. Makes it easier to read 1086the text. Tinting is done using the current background color for each window. 1087This setting applies only if :opt:`background_opacity` is set and transparent 1088windows are supported or :opt:`background_image` is set. 1089''' 1090 ) 1091 1092opt('dim_opacity', '0.75', 1093 option_type='unit_float', ctype='float', 1094 long_text=''' 1095How much to dim text that has the DIM/FAINT attribute set. One means no dimming 1096and zero means fully dimmed (i.e. invisible). 1097''' 1098 ) 1099 1100opt('selection_foreground', '#000000', 1101 option_type='to_color_or_none', 1102 long_text=''' 1103The foreground for text selected with the mouse. A value of none means to leave 1104the color unchanged. 1105''' 1106 ) 1107 1108opt('selection_background', '#fffacd', 1109 option_type='to_color', 1110 long_text='The background for text selected with the mouse.' 1111 ) 1112 1113 1114# colors.table {{{ 1115agr('colors.table', 'The color table', ''' 1116The 256 terminal colors. There are 8 basic colors, each color has a dull and 1117bright version, for the first 16 colors. You can set the remaining 240 colors as 1118color16 to color255. 1119''') 1120 1121opt('color0', '#000000', 1122 option_type='to_color', 1123 long_text='black' 1124 ) 1125 1126opt('color8', '#767676', 1127 option_type='to_color', 1128 ) 1129 1130opt('color1', '#cc0403', 1131 option_type='to_color', 1132 long_text='red' 1133 ) 1134 1135opt('color9', '#f2201f', 1136 option_type='to_color', 1137 ) 1138 1139opt('color2', '#19cb00', 1140 option_type='to_color', 1141 long_text='green' 1142 ) 1143 1144opt('color10', '#23fd00', 1145 option_type='to_color', 1146 ) 1147 1148opt('color3', '#cecb00', 1149 option_type='to_color', 1150 long_text='yellow' 1151 ) 1152 1153opt('color11', '#fffd00', 1154 option_type='to_color', 1155 ) 1156 1157opt('color4', '#0d73cc', 1158 option_type='to_color', 1159 long_text='blue' 1160 ) 1161 1162opt('color12', '#1a8fff', 1163 option_type='to_color', 1164 ) 1165 1166opt('color5', '#cb1ed1', 1167 option_type='to_color', 1168 long_text='magenta' 1169 ) 1170 1171opt('color13', '#fd28ff', 1172 option_type='to_color', 1173 ) 1174 1175opt('color6', '#0dcdcd', 1176 option_type='to_color', 1177 long_text='cyan' 1178 ) 1179 1180opt('color14', '#14ffff', 1181 option_type='to_color', 1182 ) 1183 1184opt('color7', '#dddddd', 1185 option_type='to_color', 1186 long_text='white' 1187 ) 1188 1189opt('color15', '#ffffff', 1190 option_type='to_color', 1191 ) 1192 1193opt('mark1_foreground', 'black', 1194 option_type='to_color', ctype='color_as_int', 1195 long_text='Color for marks of type 1' 1196 ) 1197 1198opt('mark1_background', '#98d3cb', 1199 option_type='to_color', ctype='color_as_int', 1200 long_text='Color for marks of type 1 (light steel blue)' 1201 ) 1202 1203opt('mark2_foreground', 'black', 1204 option_type='to_color', ctype='color_as_int', 1205 long_text='Color for marks of type 2' 1206 ) 1207 1208opt('mark2_background', '#f2dcd3', 1209 option_type='to_color', ctype='color_as_int', 1210 long_text='Color for marks of type 1 (beige)' 1211 ) 1212 1213opt('mark3_foreground', 'black', 1214 option_type='to_color', ctype='color_as_int', 1215 long_text='Color for marks of type 3' 1216 ) 1217 1218opt('mark3_background', '#f274bc', 1219 option_type='to_color', ctype='color_as_int', 1220 long_text='Color for marks of type 3 (violet)' 1221 ) 1222 1223opt('color16', '#000000', 1224 option_type='to_color', 1225 documented=False, 1226 ) 1227 1228opt('color17', '#00005f', 1229 option_type='to_color', 1230 documented=False, 1231 ) 1232 1233opt('color18', '#000087', 1234 option_type='to_color', 1235 documented=False, 1236 ) 1237 1238opt('color19', '#0000af', 1239 option_type='to_color', 1240 documented=False, 1241 ) 1242 1243opt('color20', '#0000d7', 1244 option_type='to_color', 1245 documented=False, 1246 ) 1247 1248opt('color21', '#0000ff', 1249 option_type='to_color', 1250 documented=False, 1251 ) 1252 1253opt('color22', '#005f00', 1254 option_type='to_color', 1255 documented=False, 1256 ) 1257 1258opt('color23', '#005f5f', 1259 option_type='to_color', 1260 documented=False, 1261 ) 1262 1263opt('color24', '#005f87', 1264 option_type='to_color', 1265 documented=False, 1266 ) 1267 1268opt('color25', '#005faf', 1269 option_type='to_color', 1270 documented=False, 1271 ) 1272 1273opt('color26', '#005fd7', 1274 option_type='to_color', 1275 documented=False, 1276 ) 1277 1278opt('color27', '#005fff', 1279 option_type='to_color', 1280 documented=False, 1281 ) 1282 1283opt('color28', '#008700', 1284 option_type='to_color', 1285 documented=False, 1286 ) 1287 1288opt('color29', '#00875f', 1289 option_type='to_color', 1290 documented=False, 1291 ) 1292 1293opt('color30', '#008787', 1294 option_type='to_color', 1295 documented=False, 1296 ) 1297 1298opt('color31', '#0087af', 1299 option_type='to_color', 1300 documented=False, 1301 ) 1302 1303opt('color32', '#0087d7', 1304 option_type='to_color', 1305 documented=False, 1306 ) 1307 1308opt('color33', '#0087ff', 1309 option_type='to_color', 1310 documented=False, 1311 ) 1312 1313opt('color34', '#00af00', 1314 option_type='to_color', 1315 documented=False, 1316 ) 1317 1318opt('color35', '#00af5f', 1319 option_type='to_color', 1320 documented=False, 1321 ) 1322 1323opt('color36', '#00af87', 1324 option_type='to_color', 1325 documented=False, 1326 ) 1327 1328opt('color37', '#00afaf', 1329 option_type='to_color', 1330 documented=False, 1331 ) 1332 1333opt('color38', '#00afd7', 1334 option_type='to_color', 1335 documented=False, 1336 ) 1337 1338opt('color39', '#00afff', 1339 option_type='to_color', 1340 documented=False, 1341 ) 1342 1343opt('color40', '#00d700', 1344 option_type='to_color', 1345 documented=False, 1346 ) 1347 1348opt('color41', '#00d75f', 1349 option_type='to_color', 1350 documented=False, 1351 ) 1352 1353opt('color42', '#00d787', 1354 option_type='to_color', 1355 documented=False, 1356 ) 1357 1358opt('color43', '#00d7af', 1359 option_type='to_color', 1360 documented=False, 1361 ) 1362 1363opt('color44', '#00d7d7', 1364 option_type='to_color', 1365 documented=False, 1366 ) 1367 1368opt('color45', '#00d7ff', 1369 option_type='to_color', 1370 documented=False, 1371 ) 1372 1373opt('color46', '#00ff00', 1374 option_type='to_color', 1375 documented=False, 1376 ) 1377 1378opt('color47', '#00ff5f', 1379 option_type='to_color', 1380 documented=False, 1381 ) 1382 1383opt('color48', '#00ff87', 1384 option_type='to_color', 1385 documented=False, 1386 ) 1387 1388opt('color49', '#00ffaf', 1389 option_type='to_color', 1390 documented=False, 1391 ) 1392 1393opt('color50', '#00ffd7', 1394 option_type='to_color', 1395 documented=False, 1396 ) 1397 1398opt('color51', '#00ffff', 1399 option_type='to_color', 1400 documented=False, 1401 ) 1402 1403opt('color52', '#5f0000', 1404 option_type='to_color', 1405 documented=False, 1406 ) 1407 1408opt('color53', '#5f005f', 1409 option_type='to_color', 1410 documented=False, 1411 ) 1412 1413opt('color54', '#5f0087', 1414 option_type='to_color', 1415 documented=False, 1416 ) 1417 1418opt('color55', '#5f00af', 1419 option_type='to_color', 1420 documented=False, 1421 ) 1422 1423opt('color56', '#5f00d7', 1424 option_type='to_color', 1425 documented=False, 1426 ) 1427 1428opt('color57', '#5f00ff', 1429 option_type='to_color', 1430 documented=False, 1431 ) 1432 1433opt('color58', '#5f5f00', 1434 option_type='to_color', 1435 documented=False, 1436 ) 1437 1438opt('color59', '#5f5f5f', 1439 option_type='to_color', 1440 documented=False, 1441 ) 1442 1443opt('color60', '#5f5f87', 1444 option_type='to_color', 1445 documented=False, 1446 ) 1447 1448opt('color61', '#5f5faf', 1449 option_type='to_color', 1450 documented=False, 1451 ) 1452 1453opt('color62', '#5f5fd7', 1454 option_type='to_color', 1455 documented=False, 1456 ) 1457 1458opt('color63', '#5f5fff', 1459 option_type='to_color', 1460 documented=False, 1461 ) 1462 1463opt('color64', '#5f8700', 1464 option_type='to_color', 1465 documented=False, 1466 ) 1467 1468opt('color65', '#5f875f', 1469 option_type='to_color', 1470 documented=False, 1471 ) 1472 1473opt('color66', '#5f8787', 1474 option_type='to_color', 1475 documented=False, 1476 ) 1477 1478opt('color67', '#5f87af', 1479 option_type='to_color', 1480 documented=False, 1481 ) 1482 1483opt('color68', '#5f87d7', 1484 option_type='to_color', 1485 documented=False, 1486 ) 1487 1488opt('color69', '#5f87ff', 1489 option_type='to_color', 1490 documented=False, 1491 ) 1492 1493opt('color70', '#5faf00', 1494 option_type='to_color', 1495 documented=False, 1496 ) 1497 1498opt('color71', '#5faf5f', 1499 option_type='to_color', 1500 documented=False, 1501 ) 1502 1503opt('color72', '#5faf87', 1504 option_type='to_color', 1505 documented=False, 1506 ) 1507 1508opt('color73', '#5fafaf', 1509 option_type='to_color', 1510 documented=False, 1511 ) 1512 1513opt('color74', '#5fafd7', 1514 option_type='to_color', 1515 documented=False, 1516 ) 1517 1518opt('color75', '#5fafff', 1519 option_type='to_color', 1520 documented=False, 1521 ) 1522 1523opt('color76', '#5fd700', 1524 option_type='to_color', 1525 documented=False, 1526 ) 1527 1528opt('color77', '#5fd75f', 1529 option_type='to_color', 1530 documented=False, 1531 ) 1532 1533opt('color78', '#5fd787', 1534 option_type='to_color', 1535 documented=False, 1536 ) 1537 1538opt('color79', '#5fd7af', 1539 option_type='to_color', 1540 documented=False, 1541 ) 1542 1543opt('color80', '#5fd7d7', 1544 option_type='to_color', 1545 documented=False, 1546 ) 1547 1548opt('color81', '#5fd7ff', 1549 option_type='to_color', 1550 documented=False, 1551 ) 1552 1553opt('color82', '#5fff00', 1554 option_type='to_color', 1555 documented=False, 1556 ) 1557 1558opt('color83', '#5fff5f', 1559 option_type='to_color', 1560 documented=False, 1561 ) 1562 1563opt('color84', '#5fff87', 1564 option_type='to_color', 1565 documented=False, 1566 ) 1567 1568opt('color85', '#5fffaf', 1569 option_type='to_color', 1570 documented=False, 1571 ) 1572 1573opt('color86', '#5fffd7', 1574 option_type='to_color', 1575 documented=False, 1576 ) 1577 1578opt('color87', '#5fffff', 1579 option_type='to_color', 1580 documented=False, 1581 ) 1582 1583opt('color88', '#870000', 1584 option_type='to_color', 1585 documented=False, 1586 ) 1587 1588opt('color89', '#87005f', 1589 option_type='to_color', 1590 documented=False, 1591 ) 1592 1593opt('color90', '#870087', 1594 option_type='to_color', 1595 documented=False, 1596 ) 1597 1598opt('color91', '#8700af', 1599 option_type='to_color', 1600 documented=False, 1601 ) 1602 1603opt('color92', '#8700d7', 1604 option_type='to_color', 1605 documented=False, 1606 ) 1607 1608opt('color93', '#8700ff', 1609 option_type='to_color', 1610 documented=False, 1611 ) 1612 1613opt('color94', '#875f00', 1614 option_type='to_color', 1615 documented=False, 1616 ) 1617 1618opt('color95', '#875f5f', 1619 option_type='to_color', 1620 documented=False, 1621 ) 1622 1623opt('color96', '#875f87', 1624 option_type='to_color', 1625 documented=False, 1626 ) 1627 1628opt('color97', '#875faf', 1629 option_type='to_color', 1630 documented=False, 1631 ) 1632 1633opt('color98', '#875fd7', 1634 option_type='to_color', 1635 documented=False, 1636 ) 1637 1638opt('color99', '#875fff', 1639 option_type='to_color', 1640 documented=False, 1641 ) 1642 1643opt('color100', '#878700', 1644 option_type='to_color', 1645 documented=False, 1646 ) 1647 1648opt('color101', '#87875f', 1649 option_type='to_color', 1650 documented=False, 1651 ) 1652 1653opt('color102', '#878787', 1654 option_type='to_color', 1655 documented=False, 1656 ) 1657 1658opt('color103', '#8787af', 1659 option_type='to_color', 1660 documented=False, 1661 ) 1662 1663opt('color104', '#8787d7', 1664 option_type='to_color', 1665 documented=False, 1666 ) 1667 1668opt('color105', '#8787ff', 1669 option_type='to_color', 1670 documented=False, 1671 ) 1672 1673opt('color106', '#87af00', 1674 option_type='to_color', 1675 documented=False, 1676 ) 1677 1678opt('color107', '#87af5f', 1679 option_type='to_color', 1680 documented=False, 1681 ) 1682 1683opt('color108', '#87af87', 1684 option_type='to_color', 1685 documented=False, 1686 ) 1687 1688opt('color109', '#87afaf', 1689 option_type='to_color', 1690 documented=False, 1691 ) 1692 1693opt('color110', '#87afd7', 1694 option_type='to_color', 1695 documented=False, 1696 ) 1697 1698opt('color111', '#87afff', 1699 option_type='to_color', 1700 documented=False, 1701 ) 1702 1703opt('color112', '#87d700', 1704 option_type='to_color', 1705 documented=False, 1706 ) 1707 1708opt('color113', '#87d75f', 1709 option_type='to_color', 1710 documented=False, 1711 ) 1712 1713opt('color114', '#87d787', 1714 option_type='to_color', 1715 documented=False, 1716 ) 1717 1718opt('color115', '#87d7af', 1719 option_type='to_color', 1720 documented=False, 1721 ) 1722 1723opt('color116', '#87d7d7', 1724 option_type='to_color', 1725 documented=False, 1726 ) 1727 1728opt('color117', '#87d7ff', 1729 option_type='to_color', 1730 documented=False, 1731 ) 1732 1733opt('color118', '#87ff00', 1734 option_type='to_color', 1735 documented=False, 1736 ) 1737 1738opt('color119', '#87ff5f', 1739 option_type='to_color', 1740 documented=False, 1741 ) 1742 1743opt('color120', '#87ff87', 1744 option_type='to_color', 1745 documented=False, 1746 ) 1747 1748opt('color121', '#87ffaf', 1749 option_type='to_color', 1750 documented=False, 1751 ) 1752 1753opt('color122', '#87ffd7', 1754 option_type='to_color', 1755 documented=False, 1756 ) 1757 1758opt('color123', '#87ffff', 1759 option_type='to_color', 1760 documented=False, 1761 ) 1762 1763opt('color124', '#af0000', 1764 option_type='to_color', 1765 documented=False, 1766 ) 1767 1768opt('color125', '#af005f', 1769 option_type='to_color', 1770 documented=False, 1771 ) 1772 1773opt('color126', '#af0087', 1774 option_type='to_color', 1775 documented=False, 1776 ) 1777 1778opt('color127', '#af00af', 1779 option_type='to_color', 1780 documented=False, 1781 ) 1782 1783opt('color128', '#af00d7', 1784 option_type='to_color', 1785 documented=False, 1786 ) 1787 1788opt('color129', '#af00ff', 1789 option_type='to_color', 1790 documented=False, 1791 ) 1792 1793opt('color130', '#af5f00', 1794 option_type='to_color', 1795 documented=False, 1796 ) 1797 1798opt('color131', '#af5f5f', 1799 option_type='to_color', 1800 documented=False, 1801 ) 1802 1803opt('color132', '#af5f87', 1804 option_type='to_color', 1805 documented=False, 1806 ) 1807 1808opt('color133', '#af5faf', 1809 option_type='to_color', 1810 documented=False, 1811 ) 1812 1813opt('color134', '#af5fd7', 1814 option_type='to_color', 1815 documented=False, 1816 ) 1817 1818opt('color135', '#af5fff', 1819 option_type='to_color', 1820 documented=False, 1821 ) 1822 1823opt('color136', '#af8700', 1824 option_type='to_color', 1825 documented=False, 1826 ) 1827 1828opt('color137', '#af875f', 1829 option_type='to_color', 1830 documented=False, 1831 ) 1832 1833opt('color138', '#af8787', 1834 option_type='to_color', 1835 documented=False, 1836 ) 1837 1838opt('color139', '#af87af', 1839 option_type='to_color', 1840 documented=False, 1841 ) 1842 1843opt('color140', '#af87d7', 1844 option_type='to_color', 1845 documented=False, 1846 ) 1847 1848opt('color141', '#af87ff', 1849 option_type='to_color', 1850 documented=False, 1851 ) 1852 1853opt('color142', '#afaf00', 1854 option_type='to_color', 1855 documented=False, 1856 ) 1857 1858opt('color143', '#afaf5f', 1859 option_type='to_color', 1860 documented=False, 1861 ) 1862 1863opt('color144', '#afaf87', 1864 option_type='to_color', 1865 documented=False, 1866 ) 1867 1868opt('color145', '#afafaf', 1869 option_type='to_color', 1870 documented=False, 1871 ) 1872 1873opt('color146', '#afafd7', 1874 option_type='to_color', 1875 documented=False, 1876 ) 1877 1878opt('color147', '#afafff', 1879 option_type='to_color', 1880 documented=False, 1881 ) 1882 1883opt('color148', '#afd700', 1884 option_type='to_color', 1885 documented=False, 1886 ) 1887 1888opt('color149', '#afd75f', 1889 option_type='to_color', 1890 documented=False, 1891 ) 1892 1893opt('color150', '#afd787', 1894 option_type='to_color', 1895 documented=False, 1896 ) 1897 1898opt('color151', '#afd7af', 1899 option_type='to_color', 1900 documented=False, 1901 ) 1902 1903opt('color152', '#afd7d7', 1904 option_type='to_color', 1905 documented=False, 1906 ) 1907 1908opt('color153', '#afd7ff', 1909 option_type='to_color', 1910 documented=False, 1911 ) 1912 1913opt('color154', '#afff00', 1914 option_type='to_color', 1915 documented=False, 1916 ) 1917 1918opt('color155', '#afff5f', 1919 option_type='to_color', 1920 documented=False, 1921 ) 1922 1923opt('color156', '#afff87', 1924 option_type='to_color', 1925 documented=False, 1926 ) 1927 1928opt('color157', '#afffaf', 1929 option_type='to_color', 1930 documented=False, 1931 ) 1932 1933opt('color158', '#afffd7', 1934 option_type='to_color', 1935 documented=False, 1936 ) 1937 1938opt('color159', '#afffff', 1939 option_type='to_color', 1940 documented=False, 1941 ) 1942 1943opt('color160', '#d70000', 1944 option_type='to_color', 1945 documented=False, 1946 ) 1947 1948opt('color161', '#d7005f', 1949 option_type='to_color', 1950 documented=False, 1951 ) 1952 1953opt('color162', '#d70087', 1954 option_type='to_color', 1955 documented=False, 1956 ) 1957 1958opt('color163', '#d700af', 1959 option_type='to_color', 1960 documented=False, 1961 ) 1962 1963opt('color164', '#d700d7', 1964 option_type='to_color', 1965 documented=False, 1966 ) 1967 1968opt('color165', '#d700ff', 1969 option_type='to_color', 1970 documented=False, 1971 ) 1972 1973opt('color166', '#d75f00', 1974 option_type='to_color', 1975 documented=False, 1976 ) 1977 1978opt('color167', '#d75f5f', 1979 option_type='to_color', 1980 documented=False, 1981 ) 1982 1983opt('color168', '#d75f87', 1984 option_type='to_color', 1985 documented=False, 1986 ) 1987 1988opt('color169', '#d75faf', 1989 option_type='to_color', 1990 documented=False, 1991 ) 1992 1993opt('color170', '#d75fd7', 1994 option_type='to_color', 1995 documented=False, 1996 ) 1997 1998opt('color171', '#d75fff', 1999 option_type='to_color', 2000 documented=False, 2001 ) 2002 2003opt('color172', '#d78700', 2004 option_type='to_color', 2005 documented=False, 2006 ) 2007 2008opt('color173', '#d7875f', 2009 option_type='to_color', 2010 documented=False, 2011 ) 2012 2013opt('color174', '#d78787', 2014 option_type='to_color', 2015 documented=False, 2016 ) 2017 2018opt('color175', '#d787af', 2019 option_type='to_color', 2020 documented=False, 2021 ) 2022 2023opt('color176', '#d787d7', 2024 option_type='to_color', 2025 documented=False, 2026 ) 2027 2028opt('color177', '#d787ff', 2029 option_type='to_color', 2030 documented=False, 2031 ) 2032 2033opt('color178', '#d7af00', 2034 option_type='to_color', 2035 documented=False, 2036 ) 2037 2038opt('color179', '#d7af5f', 2039 option_type='to_color', 2040 documented=False, 2041 ) 2042 2043opt('color180', '#d7af87', 2044 option_type='to_color', 2045 documented=False, 2046 ) 2047 2048opt('color181', '#d7afaf', 2049 option_type='to_color', 2050 documented=False, 2051 ) 2052 2053opt('color182', '#d7afd7', 2054 option_type='to_color', 2055 documented=False, 2056 ) 2057 2058opt('color183', '#d7afff', 2059 option_type='to_color', 2060 documented=False, 2061 ) 2062 2063opt('color184', '#d7d700', 2064 option_type='to_color', 2065 documented=False, 2066 ) 2067 2068opt('color185', '#d7d75f', 2069 option_type='to_color', 2070 documented=False, 2071 ) 2072 2073opt('color186', '#d7d787', 2074 option_type='to_color', 2075 documented=False, 2076 ) 2077 2078opt('color187', '#d7d7af', 2079 option_type='to_color', 2080 documented=False, 2081 ) 2082 2083opt('color188', '#d7d7d7', 2084 option_type='to_color', 2085 documented=False, 2086 ) 2087 2088opt('color189', '#d7d7ff', 2089 option_type='to_color', 2090 documented=False, 2091 ) 2092 2093opt('color190', '#d7ff00', 2094 option_type='to_color', 2095 documented=False, 2096 ) 2097 2098opt('color191', '#d7ff5f', 2099 option_type='to_color', 2100 documented=False, 2101 ) 2102 2103opt('color192', '#d7ff87', 2104 option_type='to_color', 2105 documented=False, 2106 ) 2107 2108opt('color193', '#d7ffaf', 2109 option_type='to_color', 2110 documented=False, 2111 ) 2112 2113opt('color194', '#d7ffd7', 2114 option_type='to_color', 2115 documented=False, 2116 ) 2117 2118opt('color195', '#d7ffff', 2119 option_type='to_color', 2120 documented=False, 2121 ) 2122 2123opt('color196', '#ff0000', 2124 option_type='to_color', 2125 documented=False, 2126 ) 2127 2128opt('color197', '#ff005f', 2129 option_type='to_color', 2130 documented=False, 2131 ) 2132 2133opt('color198', '#ff0087', 2134 option_type='to_color', 2135 documented=False, 2136 ) 2137 2138opt('color199', '#ff00af', 2139 option_type='to_color', 2140 documented=False, 2141 ) 2142 2143opt('color200', '#ff00d7', 2144 option_type='to_color', 2145 documented=False, 2146 ) 2147 2148opt('color201', '#ff00ff', 2149 option_type='to_color', 2150 documented=False, 2151 ) 2152 2153opt('color202', '#ff5f00', 2154 option_type='to_color', 2155 documented=False, 2156 ) 2157 2158opt('color203', '#ff5f5f', 2159 option_type='to_color', 2160 documented=False, 2161 ) 2162 2163opt('color204', '#ff5f87', 2164 option_type='to_color', 2165 documented=False, 2166 ) 2167 2168opt('color205', '#ff5faf', 2169 option_type='to_color', 2170 documented=False, 2171 ) 2172 2173opt('color206', '#ff5fd7', 2174 option_type='to_color', 2175 documented=False, 2176 ) 2177 2178opt('color207', '#ff5fff', 2179 option_type='to_color', 2180 documented=False, 2181 ) 2182 2183opt('color208', '#ff8700', 2184 option_type='to_color', 2185 documented=False, 2186 ) 2187 2188opt('color209', '#ff875f', 2189 option_type='to_color', 2190 documented=False, 2191 ) 2192 2193opt('color210', '#ff8787', 2194 option_type='to_color', 2195 documented=False, 2196 ) 2197 2198opt('color211', '#ff87af', 2199 option_type='to_color', 2200 documented=False, 2201 ) 2202 2203opt('color212', '#ff87d7', 2204 option_type='to_color', 2205 documented=False, 2206 ) 2207 2208opt('color213', '#ff87ff', 2209 option_type='to_color', 2210 documented=False, 2211 ) 2212 2213opt('color214', '#ffaf00', 2214 option_type='to_color', 2215 documented=False, 2216 ) 2217 2218opt('color215', '#ffaf5f', 2219 option_type='to_color', 2220 documented=False, 2221 ) 2222 2223opt('color216', '#ffaf87', 2224 option_type='to_color', 2225 documented=False, 2226 ) 2227 2228opt('color217', '#ffafaf', 2229 option_type='to_color', 2230 documented=False, 2231 ) 2232 2233opt('color218', '#ffafd7', 2234 option_type='to_color', 2235 documented=False, 2236 ) 2237 2238opt('color219', '#ffafff', 2239 option_type='to_color', 2240 documented=False, 2241 ) 2242 2243opt('color220', '#ffd700', 2244 option_type='to_color', 2245 documented=False, 2246 ) 2247 2248opt('color221', '#ffd75f', 2249 option_type='to_color', 2250 documented=False, 2251 ) 2252 2253opt('color222', '#ffd787', 2254 option_type='to_color', 2255 documented=False, 2256 ) 2257 2258opt('color223', '#ffd7af', 2259 option_type='to_color', 2260 documented=False, 2261 ) 2262 2263opt('color224', '#ffd7d7', 2264 option_type='to_color', 2265 documented=False, 2266 ) 2267 2268opt('color225', '#ffd7ff', 2269 option_type='to_color', 2270 documented=False, 2271 ) 2272 2273opt('color226', '#ffff00', 2274 option_type='to_color', 2275 documented=False, 2276 ) 2277 2278opt('color227', '#ffff5f', 2279 option_type='to_color', 2280 documented=False, 2281 ) 2282 2283opt('color228', '#ffff87', 2284 option_type='to_color', 2285 documented=False, 2286 ) 2287 2288opt('color229', '#ffffaf', 2289 option_type='to_color', 2290 documented=False, 2291 ) 2292 2293opt('color230', '#ffffd7', 2294 option_type='to_color', 2295 documented=False, 2296 ) 2297 2298opt('color231', '#ffffff', 2299 option_type='to_color', 2300 documented=False, 2301 ) 2302 2303opt('color232', '#080808', 2304 option_type='to_color', 2305 documented=False, 2306 ) 2307 2308opt('color233', '#121212', 2309 option_type='to_color', 2310 documented=False, 2311 ) 2312 2313opt('color234', '#1c1c1c', 2314 option_type='to_color', 2315 documented=False, 2316 ) 2317 2318opt('color235', '#262626', 2319 option_type='to_color', 2320 documented=False, 2321 ) 2322 2323opt('color236', '#303030', 2324 option_type='to_color', 2325 documented=False, 2326 ) 2327 2328opt('color237', '#3a3a3a', 2329 option_type='to_color', 2330 documented=False, 2331 ) 2332 2333opt('color238', '#444444', 2334 option_type='to_color', 2335 documented=False, 2336 ) 2337 2338opt('color239', '#4e4e4e', 2339 option_type='to_color', 2340 documented=False, 2341 ) 2342 2343opt('color240', '#585858', 2344 option_type='to_color', 2345 documented=False, 2346 ) 2347 2348opt('color241', '#626262', 2349 option_type='to_color', 2350 documented=False, 2351 ) 2352 2353opt('color242', '#6c6c6c', 2354 option_type='to_color', 2355 documented=False, 2356 ) 2357 2358opt('color243', '#767676', 2359 option_type='to_color', 2360 documented=False, 2361 ) 2362 2363opt('color244', '#808080', 2364 option_type='to_color', 2365 documented=False, 2366 ) 2367 2368opt('color245', '#8a8a8a', 2369 option_type='to_color', 2370 documented=False, 2371 ) 2372 2373opt('color246', '#949494', 2374 option_type='to_color', 2375 documented=False, 2376 ) 2377 2378opt('color247', '#9e9e9e', 2379 option_type='to_color', 2380 documented=False, 2381 ) 2382 2383opt('color248', '#a8a8a8', 2384 option_type='to_color', 2385 documented=False, 2386 ) 2387 2388opt('color249', '#b2b2b2', 2389 option_type='to_color', 2390 documented=False, 2391 ) 2392 2393opt('color250', '#bcbcbc', 2394 option_type='to_color', 2395 documented=False, 2396 ) 2397 2398opt('color251', '#c6c6c6', 2399 option_type='to_color', 2400 documented=False, 2401 ) 2402 2403opt('color252', '#d0d0d0', 2404 option_type='to_color', 2405 documented=False, 2406 ) 2407 2408opt('color253', '#dadada', 2409 option_type='to_color', 2410 documented=False, 2411 ) 2412 2413opt('color254', '#e4e4e4', 2414 option_type='to_color', 2415 documented=False, 2416 ) 2417 2418opt('color255', '#eeeeee', 2419 option_type='to_color', 2420 documented=False, 2421 ) 2422egr() # }}} 2423egr() # }}} 2424 2425# advanced {{{ 2426agr('advanced', 'Advanced') 2427 2428opt('shell', '.', 2429 long_text=''' 2430The shell program to execute. The default value of . means to use whatever shell 2431is set as the default shell for the current user. Note that on macOS if you 2432change this, you might need to add :code:`--login` and :code:`--interactive` 2433to ensure that the shell starts in interactive mode and reads its startup rc files. 2434''' 2435 ) 2436 2437opt('editor', '.', 2438 long_text=''' 2439The terminal editor (such as ``vim`` or ``nano``) to use when editing the kitty 2440config file or similar tasks. 2441 2442The default value of . means to use the environment variables :envvar:`VISUAL` 2443and :envvar:`EDITOR` in that order. If these variables aren't set, kitty will 2444run your :opt:`shell` (``$SHELL -l -i -c env``) to see if your shell config 2445files set :envvar:`VISUAL` or :envvar:`EDITOR`. If that doesn't work, kitty 2446will cycle through various known editors (``vim``, ``emacs``, etc) and take the 2447first one that exists on your system. 2448''') 2449 2450opt('close_on_child_death', 'no', 2451 option_type='to_bool', ctype='bool', 2452 long_text=''' 2453Close the window when the child process (shell) exits. If no (the default), the 2454terminal will remain open when the child exits as long as there are still 2455processes outputting to the terminal (for example disowned or backgrounded 2456processes). If yes, the window will close as soon as the child process exits. 2457Note that setting it to yes means that any background processes still using the 2458terminal can fail silently because their stdout/stderr/stdin no longer work. 2459''' 2460 ) 2461 2462opt('allow_remote_control', 'no', 2463 option_type='allow_remote_control', 2464 long_text=''' 2465Allow other programs to control kitty. If you turn this on other programs can 2466control all aspects of kitty, including sending text to kitty windows, opening 2467new windows, closing windows, reading the content of windows, etc. Note that 2468this even works over ssh connections. You can chose to either allow any program 2469running within kitty to control it, with :code:`yes` or only programs that 2470connect to the socket specified with the :option:`kitty --listen-on` command 2471line option, if you use the value :code:`socket-only`. The latter is useful if 2472you want to prevent programs running on a remote computer over ssh from 2473controlling kitty. Reloading the config will not affect this setting. 2474''' 2475 ) 2476 2477opt('listen_on', 'none', 2478 long_text=''' 2479Tell kitty to listen to the specified unix/tcp socket for remote control 2480connections. Note that this will apply to all kitty instances. It can be 2481overridden by the :option:`kitty --listen-on` command line flag. This option 2482accepts only UNIX sockets, such as unix:${TEMP}/mykitty or (on Linux) 2483unix:@mykitty. Environment variables are expanded. If {kitty_pid} is present 2484then it is replaced by the PID of the kitty process, otherwise the PID of the 2485kitty process is appended to the value, with a hyphen. This option is ignored 2486unless you also set :opt:`allow_remote_control` to enable remote control. See 2487the help for :option:`kitty --listen-on` for more details. Changing this option 2488by reloading the config is not supported. 2489''' 2490 ) 2491 2492opt('+env', '', 2493 option_type='env', 2494 add_to_default=False, 2495 long_text=''' 2496Specify environment variables to set in all child processes. Note that 2497environment variables are expanded recursively, so if you use:: 2498 2499 env MYVAR1=a 2500 env MYVAR2=${MYVAR1}/${HOME}/b 2501 2502The value of MYVAR2 will be :code:`a/<path to home directory>/b`. 2503''' 2504 ) 2505 2506opt('update_check_interval', '24', 2507 option_type='float', 2508 long_text=''' 2509Periodically check if an update to kitty is available. If an update is found a 2510system notification is displayed informing you of the available update. The 2511default is to check every 24 hrs, set to zero to disable. Changing this option 2512by reloading the config is not supported. 2513''' 2514 ) 2515 2516opt('startup_session', 'none', 2517 option_type='config_or_absolute_path', 2518 long_text=''' 2519Path to a session file to use for all kitty instances. Can be overridden by 2520using the :option:`kitty --session` command line option for individual 2521instances. See :ref:`sessions` in the kitty documentation for details. Note that 2522relative paths are interpreted with respect to the kitty config directory. 2523Environment variables in the path are expanded. Changing this option by reloading 2524the config is not supported. 2525''' 2526 ) 2527 2528opt('clipboard_control', 'write-clipboard write-primary', 2529 option_type='clipboard_control', 2530 long_text=''' 2531Allow programs running in kitty to read and write from the clipboard. You can 2532control exactly which actions are allowed. The set of possible actions is: 2533write-clipboard read-clipboard write-primary read-primary. The default is to 2534allow writing to the clipboard and primary selection. Note that enabling the 2535read functionality is a security risk as it means that any program, even one 2536running on a remote server via SSH can read your clipboard. See also :opt:` 2537clipboard_max_size`. 2538''' 2539 ) 2540 2541opt('clipboard_max_size', 64, option_type='positive_float', long_text=''' 2542The maximum size (in MB) of data from programs running in kitty that will be 2543stored for writing to the system clipboard. See also :opt:`clipboard_control`. 2544A value of zero means no size limit is applied. 2545''') 2546 2547opt('allow_hyperlinks', 'yes', 2548 option_type='allow_hyperlinks', ctype='bool', 2549 long_text=''' 2550Process hyperlink (OSC 8) escape sequences. If disabled OSC 8 escape sequences 2551are ignored. Otherwise they become clickable links, that you can click by 2552holding down ctrl+shift and clicking with the mouse. The special value of 2553``ask`` means that kitty will ask before opening the link. 2554''' 2555 ) 2556 2557opt('term', 'xterm-kitty', 2558 long_text=''' 2559The value of the TERM environment variable to set. Changing this can break many 2560terminal programs, only change it if you know what you are doing, not because 2561you read some advice on Stack Overflow to change it. The TERM variable is used 2562by various programs to get information about the capabilities and behavior of 2563the terminal. If you change it, depending on what programs you run, and how 2564different the terminal you are changing it to is, various things from key-presses, 2565to colors, to various advanced features may not work. Changing this option by reloading 2566the config will only affect newly created windows. 2567''' 2568 ) 2569egr() # }}} 2570 2571# os {{{ 2572agr('os', 'OS specific tweaks') 2573 2574opt('wayland_titlebar_color', 'system', 2575 option_type='macos_titlebar_color', 2576 long_text=''' 2577Change the color of the kitty window's titlebar on Wayland systems with client 2578side window decorations such as GNOME. A value of :code:`system` means to use 2579the default system color, a value of :code:`background` means to use the 2580background color of the currently active window and finally you can use an 2581arbitrary color, such as :code:`#12af59` or :code:`red`. 2582''' 2583 ) 2584 2585opt('macos_titlebar_color', 'system', 2586 option_type='macos_titlebar_color', 2587 long_text=''' 2588Change the color of the kitty window's titlebar on macOS. A value of 2589:code:`system` means to use the default system color, a value of 2590:code:`background` means to use the background color of the currently active 2591window and finally you can use an arbitrary color, such as :code:`#12af59` or 2592:code:`red`. WARNING: This option works by using a hack, as there is no proper 2593Cocoa API for it. It sets the background color of the entire window and makes 2594the titlebar transparent. As such it is incompatible with 2595:opt:`background_opacity`. If you want to use both, you are probably better off 2596just hiding the titlebar with :opt:`hide_window_decorations`. 2597''' 2598 ) 2599 2600opt('macos_option_as_alt', 'no', 2601 option_type='macos_option_as_alt', ctype='uint', 2602 long_text=''' 2603Use the option key as an alt key. With this set to :code:`no`, kitty will use 2604the macOS native :kbd:`Option+Key` = unicode character behavior. This will break 2605any :kbd:`Alt+key` keyboard shortcuts in your terminal programs, but you can use 2606the macOS unicode input technique. You can use the values: :code:`left`, 2607:code:`right`, or :code:`both` to use only the left, right or both Option keys 2608as Alt, instead. Changing this setting by reloading the config is not supported. 2609''' 2610 ) 2611 2612opt('macos_hide_from_tasks', 'no', 2613 option_type='to_bool', ctype='bool', 2614 long_text='Hide the kitty window from running tasks (:kbd:`⌘+Tab`) on macOS.' 2615 ' Changing this setting by reloading the config is not supported.' 2616 ) 2617 2618opt('macos_quit_when_last_window_closed', 'no', 2619 option_type='to_bool', ctype='bool', 2620 long_text=''' 2621Have kitty quit when all the top-level windows are closed. By default, kitty 2622will stay running, even with no open windows, as is the expected behavior on 2623macOS. 2624''' 2625 ) 2626 2627opt('macos_window_resizable', 'yes', 2628 option_type='to_bool', ctype='bool', 2629 long_text=''' 2630Disable this if you want kitty top-level (OS) windows to not be resizable on 2631macOS. Changing this setting by reloading the config will only affect newly 2632created windows. 2633''' 2634 ) 2635 2636opt('macos_thicken_font', '0', 2637 option_type='positive_float', ctype='float', 2638 long_text=''' 2639Draw an extra border around the font with the given width, to increase 2640legibility at small font sizes. For example, a value of 0.75 will result in 2641rendering that looks similar to sub-pixel antialiasing at common font sizes. 2642''' 2643 ) 2644 2645opt('macos_traditional_fullscreen', 'no', 2646 option_type='to_bool', ctype='bool', 2647 long_text='Use the traditional full-screen transition, that is faster, but less pretty.' 2648 ) 2649 2650opt('macos_show_window_title_in', 'all', 2651 choices=('all', 'menubar', 'none', 'window'), ctype='window_title_in', 2652 long_text=''' 2653Show or hide the window title in the macOS window or menu-bar. A value of 2654:code:`window` will show the title of the currently active window at the top of 2655the macOS window. A value of :code:`menubar` will show the title of the 2656currently active window in the macOS menu-bar, making use of otherwise wasted 2657space. :code:`all` will show the title everywhere and :code:`none` hides the 2658title in the window and the menu-bar. 2659''' 2660 ) 2661 2662opt('macos_custom_beam_cursor', 'no', 2663 option_type='to_bool', 2664 long_text=''' 2665Enable/disable custom mouse cursor for macOS that is easier to see on both light 2666and dark backgrounds. WARNING: this might make your mouse cursor invisible on 2667dual GPU machines. Changing this setting by reloading the config is not supported. 2668''' 2669 ) 2670 2671opt('linux_display_server', 'auto', 2672 choices=('auto', 'wayland', 'x11'), 2673 long_text=''' 2674Choose between Wayland and X11 backends. By default, an appropriate backend 2675based on the system state is chosen automatically. Set it to :code:`x11` or 2676:code:`wayland` to force the choice. Changing this setting by reloading the 2677config is not supported. 2678''' 2679 ) 2680egr() # }}} 2681 2682# shortcuts {{{ 2683agr('shortcuts', 'Keyboard shortcuts', ''' 2684Keys are identified simply by their lowercase unicode characters. For example: 2685``a`` for the A key, ``[`` for the left square bracket key, etc. For functional 2686keys, such as ``Enter or Escape`` the names are present at :ref:`functional`. 2687For a list of modifier names, see: 2688:link:`GLFW mods <https://www.glfw.org/docs/latest/group__mods.html>` 2689 2690On Linux you can also use XKB key names to bind keys that are not supported by 2691GLFW. See :link:`XKB keys 2692<https://github.com/xkbcommon/libxkbcommon/blob/master/include/xkbcommon/xkbcommon-keysyms.h>` 2693for a list of key names. The name to use is the part after the :code:`XKB_KEY_` 2694prefix. Note that you can only use an XKB key name for keys that are not known 2695as GLFW keys. 2696 2697Finally, you can use raw system key codes to map keys, again only for keys that are not 2698known as GLFW keys. To see the system key code 2699for a key, start kitty with the :option:`kitty --debug-input` option. Then kitty will 2700output some debug text for every key event. In that text look for ``native_code`` 2701the value of that becomes the key name in the shortcut. For example: 2702 2703.. code-block:: none 2704 2705 on_key_input: glfw key: 65 native_code: 0x61 action: PRESS mods: 0x0 text: 'a' 2706 2707Here, the key name for the :kbd:`A` key is :kbd:`0x61` and you can use it with:: 2708 2709 map ctrl+0x61 something 2710 2711to map :kbd:`ctrl+a` to something. 2712 2713You can use the special action :code:`no_op` to unmap a keyboard shortcut that is 2714assigned in the default configuration:: 2715 2716 map kitty_mod+space no_op 2717 2718You can combine multiple actions to be triggered by a single shortcut, using the 2719syntax below:: 2720 2721 map key combine <separator> action1 <separator> action2 <separator> action3 ... 2722 2723For example:: 2724 2725 map kitty_mod+e combine : new_window : next_layout 2726 2727this will create a new window and switch to the next available layout 2728 2729You can use multi-key shortcuts using the syntax shown below:: 2730 2731 map key1>key2>key3 action 2732 2733For example:: 2734 2735 map ctrl+f>2 set_font_size 20 2736 2737The full list of actions that can be mapped to key presses is available 2738:doc:`here </actions>`. 2739''') 2740 2741opt('kitty_mod', 'ctrl+shift', 2742 option_type='to_modifiers', 2743 long_text=''' 2744The value of :code:`kitty_mod` is used as the modifier for all default 2745shortcuts, you can change it in your kitty.conf to change the modifiers for all 2746the default shortcuts. 2747''' 2748 ) 2749 2750opt('clear_all_shortcuts', 'no', 2751 option_type='clear_all_shortcuts', 2752 long_text=''' 2753You can have kitty remove all shortcut definition seen up to this point. Useful, 2754for instance, to remove the default shortcuts. 2755''' 2756 ) 2757 2758opt('+kitten_alias', 'hints hints --hints-offset=0', 2759 option_type='kitten_alias', 2760 add_to_default=False, 2761 long_text=''' 2762You can create aliases for kitten names, this allows overriding the defaults for 2763kitten options and can also be used to shorten repeated mappings of the same 2764kitten with a specific group of options. For example, the above alias changes 2765the default value of :option:`kitty +kitten hints --hints-offset` to zero for 2766all mappings, including the builtin ones. 2767''' 2768 ) 2769 2770 2771# shortcuts.clipboard {{{ 2772agr('shortcuts.clipboard', 'Clipboard') 2773 2774map('Copy to clipboard', 2775 'copy_to_clipboard kitty_mod+c copy_to_clipboard', 2776 long_text=''' 2777There is also a :code:`copy_or_interrupt` action that can be optionally mapped 2778to :kbd:`Ctrl+c`. It will copy only if there is a selection and send an 2779interrupt otherwise. Similarly, :code:`copy_and_clear_or_interrupt` will copy 2780and clear the selection or send an interrupt if there is no selection. 2781''' 2782 ) 2783map('Copy to clipboard', 2784 'copy_to_clipboard cmd+c copy_to_clipboard', 2785 only="macos", 2786 documented=False, 2787 ) 2788 2789map('Paste from clipboard', 2790 'paste_from_clipboard kitty_mod+v paste_from_clipboard', 2791 ) 2792map('Paste from clipboard', 2793 'paste_from_clipboard cmd+v paste_from_clipboard', 2794 only="macos", 2795 documented=False, 2796 ) 2797 2798map('Paste from selection', 2799 'paste_from_selection kitty_mod+s paste_from_selection', 2800 ) 2801map('Paste from selection', 2802 'paste_from_selection shift+insert paste_from_selection', 2803 ) 2804 2805map('Pass selection to program', 2806 'pass_selection_to_program kitty_mod+o pass_selection_to_program', 2807 long_text=''' 2808You can also pass the contents of the current selection to any program using 2809:code:`pass_selection_to_program`. By default, the system's open program is used, but 2810you can specify your own, the selection will be passed as a command line argument to the program, 2811for example:: 2812 2813 map kitty_mod+o pass_selection_to_program firefox 2814 2815You can pass the current selection to a terminal program running in a new kitty 2816window, by using the @selection placeholder:: 2817 2818 map kitty_mod+y new_window less @selection 2819''' 2820 ) 2821egr() # }}} 2822 2823 2824# shortcuts.scrolling {{{ 2825agr('shortcuts.scrolling', 'Scrolling') 2826 2827map('Scroll line up', 2828 'scroll_line_up kitty_mod+up scroll_line_up', 2829 ) 2830map('Scroll line up', 2831 'scroll_line_up kitty_mod+k scroll_line_up', 2832 ) 2833map('Scroll line up', 2834 'scroll_line_up alt+cmd+page_up scroll_line_up', 2835 only="macos", 2836 ) 2837map('Scroll line up', 2838 'scroll_line_up cmd+up scroll_line_up', 2839 only="macos", 2840 ) 2841 2842map('Scroll line down', 2843 'scroll_line_down kitty_mod+down scroll_line_down', 2844 ) 2845map('Scroll line down', 2846 'scroll_line_down kitty_mod+j scroll_line_down', 2847 ) 2848map('Scroll line down', 2849 'scroll_line_down alt+cmd+page_down scroll_line_down', 2850 only="macos", 2851 ) 2852map('Scroll line down', 2853 'scroll_line_down cmd+down scroll_line_down', 2854 only="macos", 2855 ) 2856 2857map('Scroll page up', 2858 'scroll_page_up kitty_mod+page_up scroll_page_up', 2859 ) 2860map('Scroll page up', 2861 'scroll_page_up cmd+page_up scroll_page_up', 2862 only="macos", 2863 ) 2864 2865map('Scroll page down', 2866 'scroll_page_down kitty_mod+page_down scroll_page_down', 2867 ) 2868map('Scroll page down', 2869 'scroll_page_down cmd+page_down scroll_page_down', 2870 only="macos", 2871 ) 2872 2873map('Scroll to top', 2874 'scroll_home kitty_mod+home scroll_home', 2875 ) 2876map('Scroll to top', 2877 'scroll_home cmd+home scroll_home', 2878 only="macos", 2879 ) 2880 2881map('Scroll to bottom', 2882 'scroll_end kitty_mod+end scroll_end', 2883 ) 2884map('Scroll to bottom', 2885 'scroll_end cmd+end scroll_end', 2886 only="macos", 2887 ) 2888 2889map('Browse scrollback buffer in less', 2890 'show_scrollback kitty_mod+h show_scrollback', 2891 long_text=''' 2892You can pipe the contents of the current screen + history buffer as 2893:file:`STDIN` to an arbitrary program using the ``launch`` function. For example, 2894the following opens the scrollback buffer in less in an overlay window:: 2895 2896 map f1 launch --stdin-source=@screen_scrollback --stdin-add-formatting --type=overlay less +G -R 2897 2898For more details on piping screen and buffer contents to external programs, 2899see :doc:`launch`. 2900''' 2901 ) 2902egr() # }}} 2903 2904 2905# shortcuts.window {{{ 2906agr('shortcuts.window', 'Window management') 2907 2908map('New window', 2909 'new_window kitty_mod+enter new_window', 2910 long_text=''' 2911You can open a new window running an arbitrary program, for example:: 2912 2913 map kitty_mod+y launch mutt 2914 2915You can open a new window with the current working directory set to the 2916working directory of the current window using:: 2917 2918 map ctrl+alt+enter launch --cwd=current 2919 2920You can open a new window that is allowed to control kitty via 2921the kitty remote control facility by prefixing the command line with @. 2922Any programs running in that window will be allowed to control kitty. 2923For example:: 2924 2925 map ctrl+enter launch --allow-remote-control some_program 2926 2927You can open a new window next to the currently active window or as the first window, 2928with:: 2929 2930 map ctrl+n launch --location=neighbor some_program 2931 map ctrl+f launch --location=first some_program 2932 2933For more details, see :doc:`launch`. 2934''' 2935 ) 2936map('New window', 2937 'new_window cmd+enter new_window', 2938 only="macos", 2939 ) 2940 2941map('New OS window', 2942 'new_os_window kitty_mod+n new_os_window', 2943 long_text=''' 2944Works like new_window above, except that it opens a top level OS kitty window. 2945In particular you can use new_os_window_with_cwd to open a window with the 2946current working directory. 2947''' 2948 ) 2949map('New OS window', 2950 'new_os_window cmd+n new_os_window', 2951 only="macos", 2952 ) 2953 2954map('Close window', 2955 'close_window kitty_mod+w close_window', 2956 ) 2957map('Close window', 2958 'close_window shift+cmd+d close_window', 2959 only="macos", 2960 ) 2961 2962map('Next window', 2963 'next_window kitty_mod+] next_window', 2964 ) 2965 2966map('Previous window', 2967 'previous_window kitty_mod+[ previous_window', 2968 ) 2969 2970map('Move window forward', 2971 'move_window_forward kitty_mod+f move_window_forward', 2972 ) 2973 2974map('Move window backward', 2975 'move_window_backward kitty_mod+b move_window_backward', 2976 ) 2977 2978map('Move window to top', 2979 'move_window_to_top kitty_mod+` move_window_to_top', 2980 ) 2981 2982map('Start resizing window', 2983 'start_resizing_window kitty_mod+r start_resizing_window', 2984 ) 2985map('Start resizing window', 2986 'start_resizing_window cmd+r start_resizing_window', 2987 only="macos", 2988 ) 2989 2990map('First window', 2991 'first_window kitty_mod+1 first_window', 2992 ) 2993map('First window', 2994 'first_window cmd+1 first_window', 2995 only="macos", 2996 ) 2997 2998map('Second window', 2999 'second_window kitty_mod+2 second_window', 3000 ) 3001map('Second window', 3002 'second_window cmd+2 second_window', 3003 only="macos", 3004 ) 3005 3006map('Third window', 3007 'third_window kitty_mod+3 third_window', 3008 ) 3009map('Third window', 3010 'third_window cmd+3 third_window', 3011 only="macos", 3012 ) 3013 3014map('Fourth window', 3015 'fourth_window kitty_mod+4 fourth_window', 3016 ) 3017map('Fourth window', 3018 'fourth_window cmd+4 fourth_window', 3019 only="macos", 3020 ) 3021 3022map('Fifth window', 3023 'fifth_window kitty_mod+5 fifth_window', 3024 ) 3025map('Fifth window', 3026 'fifth_window cmd+5 fifth_window', 3027 only="macos", 3028 ) 3029 3030map('Sixth window', 3031 'sixth_window kitty_mod+6 sixth_window', 3032 ) 3033map('Sixth window', 3034 'sixth_window cmd+6 sixth_window', 3035 only="macos", 3036 ) 3037 3038map('Seventh window', 3039 'seventh_window kitty_mod+7 seventh_window', 3040 ) 3041map('Seventh window', 3042 'seventh_window cmd+7 seventh_window', 3043 only="macos", 3044 ) 3045 3046map('Eight window', 3047 'eighth_window kitty_mod+8 eighth_window', 3048 ) 3049map('Eight window', 3050 'eighth_window cmd+8 eighth_window', 3051 only="macos", 3052 ) 3053 3054map('Ninth window', 3055 'ninth_window kitty_mod+9 ninth_window', 3056 ) 3057map('Ninth window', 3058 'ninth_window cmd+9 ninth_window', 3059 only="macos", 3060 ) 3061 3062map('Tenth window', 3063 'tenth_window kitty_mod+0 tenth_window', 3064 ) 3065egr() # }}} 3066 3067 3068# shortcuts.tab {{{ 3069agr('shortcuts.tab', 'Tab management') 3070 3071map('Next tab', 3072 'next_tab kitty_mod+right next_tab', 3073 ) 3074map('Next tab', 3075 'next_tab shift+cmd+] next_tab', 3076 only="macos", 3077 ) 3078map('Next tab', 3079 'next_tab ctrl+tab next_tab', 3080 ) 3081 3082map('Previous tab', 3083 'previous_tab kitty_mod+left previous_tab', 3084 ) 3085map('Previous tab', 3086 'previous_tab shift+cmd+[ previous_tab', 3087 only="macos", 3088 ) 3089map('Previous tab', 3090 'previous_tab shift+ctrl+tab previous_tab', 3091 ) 3092 3093map('New tab', 3094 'new_tab kitty_mod+t new_tab', 3095 ) 3096map('New tab', 3097 'new_tab cmd+t new_tab', 3098 only="macos", 3099 ) 3100 3101map('Close tab', 3102 'close_tab kitty_mod+q close_tab', 3103 ) 3104map('Close tab', 3105 'close_tab cmd+w close_tab', 3106 only="macos", 3107 ) 3108 3109map('Close OS window', 3110 'close_os_window shift+cmd+w close_os_window', 3111 only="macos", 3112 ) 3113 3114map('Move tab forward', 3115 'move_tab_forward kitty_mod+. move_tab_forward', 3116 ) 3117 3118map('Move tab backward', 3119 'move_tab_backward kitty_mod+, move_tab_backward', 3120 ) 3121 3122map('Set tab title', 3123 'set_tab_title kitty_mod+alt+t set_tab_title', 3124 ) 3125map('Set tab title', 3126 'set_tab_title shift+cmd+i set_tab_title', 3127 only="macos", 3128 ) 3129egr(''' 3130You can also create shortcuts to go to specific tabs, with 1 being the first 3131tab, 2 the second tab and -1 being the previously active tab, and any number 3132larger than the last tab being the last tab:: 3133 3134 map ctrl+alt+1 goto_tab 1 3135 map ctrl+alt+2 goto_tab 2 3136 3137Just as with :code:`new_window` above, you can also pass the name of arbitrary 3138commands to run when using new_tab and use :code:`new_tab_with_cwd`. Finally, 3139if you want the new tab to open next to the current tab rather than at the 3140end of the tabs list, use:: 3141 3142 map ctrl+t new_tab !neighbor [optional cmd to run] 3143''') # }}} 3144 3145 3146# shortcuts.layout {{{ 3147agr('shortcuts.layout', 'Layout management') 3148 3149map('Next layout', 3150 'next_layout kitty_mod+l next_layout', 3151 ) 3152egr(''' 3153You can also create shortcuts to switch to specific layouts:: 3154 3155 map ctrl+alt+t goto_layout tall 3156 map ctrl+alt+s goto_layout stack 3157 3158Similarly, to switch back to the previous layout:: 3159 3160 map ctrl+alt+p last_used_layout 3161 3162There is also a toggle layout function that switches 3163to the named layout or back to the previous layout if 3164in the named layout. Useful to temporarily "zoom" the 3165active window by switching to the stack layout:: 3166 3167 map ctrl+alt+z toggle_layout stack 3168''') # }}} 3169 3170 3171# shortcuts.fonts {{{ 3172agr('shortcuts.fonts', 'Font sizes', ''' 3173You can change the font size for all top-level kitty OS windows at a time or 3174only the current one. 3175''') 3176 3177map('Increase font size', 3178 'increase_font_size kitty_mod+equal change_font_size all +2.0', 3179 ) 3180map('Increase font size', 3181 'increase_font_size kitty_mod+plus change_font_size all +2.0', 3182 ) 3183map('Increase font size', 3184 'increase_font_size kitty_mod+kp_add change_font_size all +2.0', 3185 ) 3186map('Increase font size', 3187 'increase_font_size cmd+plus change_font_size all +2.0', 3188 only="macos", 3189 ) 3190map('Increase font size', 3191 'increase_font_size cmd+equal change_font_size all +2.0', 3192 only="macos", 3193 ) 3194map('Increase font size', 3195 'increase_font_size cmd+shift+equal change_font_size all +2.0', 3196 only="macos", 3197 ) 3198 3199map('Decrease font size', 3200 'decrease_font_size kitty_mod+minus change_font_size all -2.0', 3201 ) 3202map('Decrease font size', 3203 'decrease_font_size kitty_mod+kp_subtract change_font_size all -2.0', 3204 ) 3205map('Decrease font size', 3206 'decrease_font_size cmd+minus change_font_size all -2.0', 3207 only="macos", 3208 ) 3209map('Decrease font size', 3210 'decrease_font_size cmd+shift+minus change_font_size all -2.0', 3211 only="macos", 3212 ) 3213 3214map('Reset font size', 3215 'reset_font_size kitty_mod+backspace change_font_size all 0', 3216 ) 3217map('Reset font size', 3218 'reset_font_size cmd+0 change_font_size all 0', 3219 only="macos", 3220 ) 3221egr(''' 3222To setup shortcuts for specific font sizes:: 3223 3224 map kitty_mod+f6 change_font_size all 10.0 3225 3226To setup shortcuts to change only the current OS window's font size:: 3227 3228 map kitty_mod+f6 change_font_size current 10.0 3229''') # }}} 3230 3231 3232# shortcuts.selection {{{ 3233agr('shortcuts.selection', 'Select and act on visible text', ''' 3234Use the hints kitten to select text and either pass it to an external program or 3235insert it into the terminal or copy it to the clipboard. 3236''') 3237 3238map('Open URL', 3239 'open_url kitty_mod+e open_url_with_hints', 3240 long_text=''' 3241Open a currently visible URL using the keyboard. The program used to open the 3242URL is specified in :opt:`open_url_with`. 3243''' 3244 ) 3245 3246map('Insert selected path', 3247 'insert_selected_path kitty_mod+p>f kitten hints --type path --program -', 3248 long_text=''' 3249Select a path/filename and insert it into the terminal. Useful, for instance to 3250run git commands on a filename output from a previous git command. 3251''' 3252 ) 3253 3254map('Open selected path', 3255 'open_selected_path kitty_mod+p>shift+f kitten hints --type path', 3256 long_text='Select a path/filename and open it with the default open program.' 3257 ) 3258 3259map('Insert selected line', 3260 'insert_selected_line kitty_mod+p>l kitten hints --type line --program -', 3261 long_text=''' 3262Select a line of text and insert it into the terminal. Use for the output of 3263things like: ls -1 3264''' 3265 ) 3266 3267map('Insert selected word', 3268 'insert_selected_word kitty_mod+p>w kitten hints --type word --program -', 3269 long_text='Select words and insert into terminal.' 3270 ) 3271 3272map('Insert selected hash', 3273 'insert_selected_hash kitty_mod+p>h kitten hints --type hash --program -', 3274 long_text=''' 3275Select something that looks like a hash and insert it into the terminal. Useful 3276with git, which uses sha1 hashes to identify commits 3277''' 3278 ) 3279 3280map('Open the selected file at the selected line', 3281 'goto_file_line kitty_mod+p>n kitten hints --type linenum', 3282 long_text=''' 3283Select something that looks like :code:`filename:linenum` and open it in vim at 3284the specified line number. 3285''' 3286 ) 3287 3288map('Open the selected hyperlink', 3289 'open_selected_hyperlink kitty_mod+p>y kitten hints --type hyperlink', 3290 long_text=''' 3291Select a hyperlink (i.e. a URL that has been marked as such by the terminal 3292program, for example, by ls --hyperlink=auto). 3293''' 3294 ) 3295egr(''' 3296The hints kitten has many more modes of operation that you can map to different 3297shortcuts. For a full description see :doc:`kittens/hints`. 3298''') # }}} 3299 3300 3301# shortcuts.misc {{{ 3302agr('shortcuts.misc', 'Miscellaneous') 3303 3304map('Toggle fullscreen', 3305 'toggle_fullscreen kitty_mod+f11 toggle_fullscreen', 3306 ) 3307 3308map('Toggle maximized', 3309 'toggle_maximized kitty_mod+f10 toggle_maximized', 3310 ) 3311 3312map('Unicode input', 3313 'input_unicode_character kitty_mod+u kitten unicode_input', 3314 ) 3315map('Unicode input', 3316 'input_unicode_character cmd+ctrl+space kitten unicode_input', 3317 only="macos", 3318 ) 3319 3320map('Edit config file', 3321 'edit_config_file kitty_mod+f2 edit_config_file', 3322 ) 3323map('Edit config file', 3324 'edit_config_file cmd+, edit_config_file', 3325 only="macos", 3326 ) 3327 3328map('Open the kitty command shell', 3329 'kitty_shell kitty_mod+escape kitty_shell window', 3330 long_text=''' 3331Open the kitty shell in a new window/tab/overlay/os_window to control kitty 3332using commands. 3333''' 3334 ) 3335 3336map('Increase background opacity', 3337 'increase_background_opacity kitty_mod+a>m set_background_opacity +0.1', 3338 ) 3339 3340map('Decrease background opacity', 3341 'decrease_background_opacity kitty_mod+a>l set_background_opacity -0.1', 3342 ) 3343 3344map('Make background fully opaque', 3345 'full_background_opacity kitty_mod+a>1 set_background_opacity 1', 3346 ) 3347 3348map('Reset background opacity', 3349 'reset_background_opacity kitty_mod+a>d set_background_opacity default', 3350 ) 3351 3352map('Reset the terminal', 3353 'reset_terminal kitty_mod+delete clear_terminal reset active', 3354 long_text=''' 3355You can create shortcuts to clear/reset the terminal. For example:: 3356 3357 # Reset the terminal 3358 map kitty_mod+f9 clear_terminal reset active 3359 # Clear the terminal screen by erasing all contents 3360 map kitty_mod+f10 clear_terminal clear active 3361 # Clear the terminal scrollback by erasing it 3362 map kitty_mod+f11 clear_terminal scrollback active 3363 # Scroll the contents of the screen into the scrollback 3364 map kitty_mod+f12 clear_terminal scroll active 3365 3366If you want to operate on all windows instead of just the current one, use 3367:italic:`all` instead of :italic:`active`. 3368 3369It is also possible to remap Ctrl+L to both scroll the current screen contents 3370into the scrollback buffer and clear the screen, instead of just clearing the 3371screen, for example, for ZSH add the following to :file:`~/.zshrc`: 3372 3373.. code-block:: sh 3374 3375 scroll-and-clear-screen() { 3376 printf '\\n%.0s' {1..$LINES} 3377 zle clear-screen 3378 } 3379 zle -N scroll-and-clear-screen 3380 bindkey '^l' scroll-and-clear-screen 3381 3382''' 3383 ) 3384 3385map('Reset the terminal', 3386 'reset_terminal cmd+option+r clear_terminal reset active', 3387 only="macos", 3388 ) 3389 3390map('Reload kitty.conf', 3391 'reload_config_file kitty_mod+f5 load_config_file', 3392 long_text=''' 3393Reload kitty.conf, applying any changes since the last time it was loaded. 3394Note that a handful of settings cannot be dynamically changed and require a 3395full restart of kitty. You can also map a keybinding to load a different 3396config file, for example:: 3397 3398 map f5 load_config /path/to/alternative/kitty.conf 3399 3400Note that all setting from the original kitty.conf are discarded, in other words 3401the new conf settings *replace* the old ones. 3402''' 3403 ) 3404 3405map('Reload kitty.conf', 3406 'reload_config_file cmd+control+, load_config_file', 3407 only='macos' 3408 ) 3409 3410map('Debug kitty configuration', 3411 'debug_config kitty_mod+f6 debug_config', 3412 long_text=''' 3413Show details about exactly what configuration kitty is running with and 3414its host environment. Useful for debugging issues. 3415''' 3416 ) 3417 3418map('Debug kitty configuration', 3419 'debug_config cmd+option+, debug_config', 3420 only='macos' 3421 ) 3422 3423 3424map('Send arbitrary text on key presses', 3425 'send_text ctrl+shift+alt+h send_text all Hello World', 3426 add_to_default=False, 3427 long_text=''' 3428You can tell kitty to send arbitrary (UTF-8) encoded text to 3429the client program when pressing specified shortcut keys. For example:: 3430 3431 map ctrl+alt+a send_text all Special text 3432 3433This will send "Special text" when you press the :kbd:`ctrl+alt+a` key 3434combination. The text to be sent is a python string literal so you can use 3435escapes like :code:`\\x1b` to send control codes or :code:`\\u21fb` to send 3436unicode characters (or you can just input the unicode characters directly as 3437UTF-8 text). The first argument to :code:`send_text` is the keyboard modes in which to 3438activate the shortcut. The possible values are :code:`normal` or :code:`application` or :code:`kitty` 3439or a comma separated combination of them. The special keyword :code:`all` means all 3440modes. The modes :code:`normal` and :code:`application` refer to the DECCKM cursor key mode for 3441terminals, and :code:`kitty` refers to the special kitty extended keyboard protocol. 3442 3443Another example, that outputs a word and then moves the cursor to the start of 3444the line (same as pressing the Home key):: 3445 3446 map ctrl+alt+a send_text normal Word\\x1b[H 3447 map ctrl+alt+a send_text application Word\\x1bOH 3448''' 3449 ) 3450egr() # }}} 3451egr() # }}} 3452