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