From: Samir Benmendil Date: Sun, 24 Jan 2021 04:11:45 +0000 (+0000) Subject: kitty: initial configuration X-Git-Url: https://git.rmz.io/dotfiles.git/commitdiff_plain/7e8aada7d78b232be5e952098e3da32f3c2cf2f8?ds=inline kitty: initial configuration --- diff --git a/kitty/kitty.conf b/kitty/kitty.conf index ac134c7..9790325 100644 --- a/kitty/kitty.conf +++ b/kitty/kitty.conf @@ -2,188 +2,27 @@ #: Fonts {{{ -#: kitty has very powerful font management. You can configure -#: individual font faces and even specify special fonts for particular -#: characters. - -font_family monospace -bold_font auto -italic_font auto -bold_italic_font auto - -#: You can specify different fonts for the bold/italic/bold-italic -#: variants. To get a full list of supported fonts use the `kitty -#: list-fonts` command. By default they are derived automatically, by -#: the OSes font system. Setting them manually is useful for font -#: families that have many weight variants like Book, Medium, Thick, -#: etc. For example:: - -#: font_family Operator Mono Book -#: bold_font Operator Mono Medium -#: italic_font Operator Mono Book Italic -#: bold_italic_font Operator Mono Medium Italic - -font_size 11.0 - -#: Font size (in pts) - -force_ltr no - -#: kitty does not support BIDI (bidirectional text), however, for RTL -#: scripts, words are automatically displayed in RTL. That is to say, -#: in an RTL script, the words "HELLO WORLD" display in kitty as -#: "WORLD HELLO", and if you try to select a substring of an RTL- -#: shaped string, you will get the character that would be there had -#: the the string been LTR. For example, assuming the Hebrew word -#: ירושלים, selecting the character that on the screen appears to be ם -#: actually writes into the selection buffer the character י. - -#: kitty's default behavior is useful in conjunction with a filter to -#: reverse the word order, however, if you wish to manipulate RTL -#: glyphs, it can be very challenging to work with, so this option is -#: provided to turn it off. Furthermore, this option can be used with -#: the command line program GNU FriBidi -#: to get BIDI -#: support, because it will force kitty to always treat the text as -#: LTR, which FriBidi expects for terminals. - -adjust_line_height 0 -adjust_column_width 0 - -#: Change the size of each character cell kitty renders. You can use -#: either numbers, which are interpreted as pixels or percentages -#: (number followed by %), which are interpreted as percentages of the -#: unmodified values. You can use negative pixels or percentages less -#: than 100% to reduce sizes (but this might cause rendering -#: artifacts). +#: To list all fonts: `kitty list-fonts` +font_family Fira Code +font_size 11.0 + +#: Fira has a few features see https://github.com/tonsky/FiraCode/wiki/How-to-enable-stylistic-sets +font_features FiraCode-Bold +ss03 +font_features FiraCode-Light +ss03 +font_features FiraCode-Medium +ss03 +font_features FiraCode-Regular +ss03 +font_features FiraCode-Retina +ss03 +font_features FiraCode-SemiBold +ss03 # symbol_map U+E0A0-U+E0A3,U+E0C0-U+E0C7 PowerlineSymbols -#: Map the specified unicode codepoints to a particular font. Useful -#: if you need special rendering for some symbols, such as for -#: Powerline. Avoids the need for patched fonts. Each unicode code -#: point is specified in the form U+. You -#: can specify multiple code points, separated by commas and ranges -#: separated by hyphens. symbol_map itself can be specified multiple -#: times. Syntax is:: - -#: symbol_map codepoints Font Family Name - -disable_ligatures never - -#: Choose how you want to handle multi-character ligatures. The -#: default is to always render them. You can tell kitty to not render -#: them when the cursor is over them by using cursor to make editing -#: easier, or have kitty never render them at all by using always, if -#: you don't like them. The ligature strategy can be set per-window -#: either using the kitty remote control facility or by defining -#: shortcuts for it in kitty.conf, for example:: - -#: map alt+1 disable_ligatures_in active always -#: map alt+2 disable_ligatures_in all never -#: map alt+3 disable_ligatures_in tab cursor - -#: Note that this refers to programming ligatures, typically -#: implemented using the calt OpenType feature. For disabling general -#: ligatures, use the font_features setting. - -font_features none - -#: Choose exactly which OpenType features to enable or disable. This -#: is useful as some fonts might have features worthwhile in a -#: terminal. For example, Fira Code Retina includes a discretionary -#: feature, zero, which in that font changes the appearance of the -#: zero (0), to make it more easily distinguishable from Ø. Fira Code -#: Retina also includes other discretionary features known as -#: Stylistic Sets which have the tags ss01 through ss20. - -#: Note that this code is indexed by PostScript name, and not the font -#: family. This allows you to define very precise feature settings; -#: e.g. you can disable a feature in the italic font but not in the -#: regular font. - -#: On Linux, these are read from the FontConfig database first and -#: then this, setting is applied, so they can be configured in a -#: single, central place. - -#: To get the PostScript name for a font, use kitty + list-fonts -#: --psnames: - -#: .. code-block:: sh - -#: $ kitty + list-fonts --psnames | grep Fira -#: Fira Code -#: Fira Code Bold (FiraCode-Bold) -#: Fira Code Light (FiraCode-Light) -#: Fira Code Medium (FiraCode-Medium) -#: Fira Code Regular (FiraCode-Regular) -#: Fira Code Retina (FiraCode-Retina) - -#: The part in brackets is the PostScript name. - -#: Enable alternate zero and oldstyle numerals:: - -#: font_features FiraCode-Retina +zero +onum - -#: Enable only alternate zero:: - -#: font_features FiraCode-Retina +zero - -#: Disable the normal ligatures, but keep the calt feature which (in -#: this font) breaks up monotony:: - -#: font_features TT2020StyleB-Regular -liga +calt - -#: In conjunction with force_ltr, you may want to disable Arabic -#: shaping entirely, and only look at their isolated forms if they -#: show up in a document. You can do this with e.g.:: - -#: font_features UnifontMedium +isol -medi -fina -init - -box_drawing_scale 0.001, 1, 1.5, 2 - -#: Change the sizes of the lines used for the box drawing unicode -#: characters These values are in pts. They will be scaled by the -#: monitor DPI to arrive at a pixel value. There must be four values -#: corresponding to thin, normal, thick, and very thick lines. - #: }}} #: Cursor customization {{{ -cursor #cccccc - -#: Default cursor color - -cursor_text_color #111111 - -#: Choose the color of text under the cursor. If you want it rendered -#: with the background color of the cell underneath instead, use the -#: special keyword: background - -cursor_shape block - -#: The cursor shape can be one of (block, beam, underline) - -cursor_beam_thickness 1.5 - -#: Defines the thickness of the beam cursor (in pts) - -cursor_underline_thickness 2.0 - -#: Defines the thickness of the underline cursor (in pts) - -cursor_blink_interval -1 - -#: The interval (in seconds) at which to blink the cursor. Set to zero -#: to disable blinking. Negative values mean use system default. Note -#: that numbers smaller than repaint_delay will be limited to -#: repaint_delay. - -cursor_stop_blinking_after 15.0 - -#: Stop blinking cursor after the specified number of seconds of -#: keyboard inactivity. Set to zero to never stop blinking. +#: One of block, beam or underline (thickness can also be configured) +cursor_shape block +cursor_blink_interval 0 #: }}} @@ -191,152 +30,36 @@ cursor_stop_blinking_after 15.0 scrollback_lines 2000 -#: Number of lines of history to keep in memory for scrolling back. -#: Memory is allocated on demand. Negative numbers are (effectively) -#: infinite scrollback. Note that using very large scrollback is not -#: recommended as it can slow down performance of the terminal and -#: also use large amounts of RAM. Instead, consider using -#: scrollback_pager_history_size. - +#: Separate scrollback pager (MB) +#:TODO what is this exactly? +scrollback_pager_history_size 100 scrollback_pager less --chop-long-lines --RAW-CONTROL-CHARS +INPUT_LINE_NUMBER -#: Program with which to view scrollback in a new window. The -#: scrollback buffer is passed as STDIN to this program. If you change -#: it, make sure the program you use can handle ANSI escape sequences -#: for colors and text formatting. INPUT_LINE_NUMBER in the command -#: line above will be replaced by an integer representing which line -#: should be at the top of the screen. Similarly CURSOR_LINE and -#: CURSOR_COLUMN will be replaced by the current cursor position. - -scrollback_pager_history_size 0 - -#: Separate scrollback history size, used only for browsing the -#: scrollback buffer (in MB). This separate buffer is not available -#: for interactive scrolling but will be piped to the pager program -#: when viewing scrollback buffer in a separate window. The current -#: implementation stores the data in UTF-8, so approximatively 10000 -#: lines per megabyte at 100 chars per line, for pure ASCII text, -#: unformatted text. A value of zero or less disables this feature. -#: The maximum allowed size is 4GB. - -wheel_scroll_multiplier 5.0 - -#: Modify the amount scrolled by the mouse wheel. Note this is only -#: used for low precision scrolling devices, not for high precision -#: scrolling on platforms such as macOS and Wayland. Use negative -#: numbers to change scroll direction. - -touch_scroll_multiplier 1.0 - -#: Modify the amount scrolled by a touchpad. Note this is only used -#: for high precision scrolling devices on platforms such as macOS and -#: Wayland. Use negative numbers to change scroll direction. - #: }}} #: Mouse {{{ -mouse_hide_wait 3.0 - -#: Hide mouse cursor after the specified number of seconds of the -#: mouse not being used. Set to zero to disable mouse cursor hiding. -#: Set to a negative value to hide the mouse cursor immediately when -#: typing text. Disabled by default on macOS as getting it to work -#: robustly with the ever-changing sea of bugs that is Cocoa is too -#: much effort. - -url_color #0087bd -url_style curly - -#: The color and style for highlighting URLs on mouse-over. url_style -#: can be one of: none, single, double, curly - +#: URLs +detect_urls yes +url_prefixes http https file ftp +open_url_with default open_url_modifiers kitty_mod +url_style curly -#: The modifier keys to press when clicking with the mouse on URLs to -#: open the URL - -open_url_with default - -#: The program with which to open URLs that are clicked on. The -#: special value default means to use the operating system's default -#: URL handler. - -url_prefixes http https file ftp - -#: The set of URL prefixes to look for when detecting a URL under the -#: mouse cursor. - -detect_urls yes - -#: Detect URLs under the mouse. Detected URLs are highlighted with an -#: underline and the mouse cursor becomes a hand over them. Even if -#: this option is disabled, URLs are still clickable. - -copy_on_select no - -#: Copy to clipboard or a private buffer on select. With this set to -#: clipboard, simply selecting text with the mouse will cause the text -#: to be copied to clipboard. Useful on platforms such as macOS that -#: do not have the concept of primary selections. You can instead -#: specify a name such as a1 to copy to a private kitty buffer -#: instead. Map a shortcut with the paste_from_buffer action to paste -#: from this private buffer. For example:: - -#: map cmd+shift+v paste_from_buffer a1 - -#: Note that copying to the clipboard is a security risk, as all -#: programs, including websites open in your browser can read the -#: contents of the system clipboard. - -strip_trailing_spaces never - -#: Remove spaces at the end of lines when copying to clipboard. A -#: value of smart will do it when using normal selections, but not -#: rectangle selections. always will always do it. - +#: coping and selection +copy_on_select no +strip_trailing_spaces never rectangle_select_modifiers ctrl+alt +terminal_select_modifiers shift +select_by_word_characters @-./_~?&=%+# +click_interval 0.5 -#: The modifiers to use rectangular selection (i.e. to select text in -#: a rectangular block with the mouse) - -terminal_select_modifiers shift - -#: The modifiers to override mouse selection even when a terminal -#: application has grabbed the mouse - -select_by_word_characters @-./_~?&=%+# - -#: Characters considered part of a word when double clicking. In -#: addition to these characters any character that is marked as an -#: alphanumeric character in the unicode database will be matched. - -click_interval -1.0 - -#: The interval between successive clicks to detect double/triple -#: clicks (in seconds). Negative numbers will use the system default -#: instead, if available, or fallback to 0.5. - -focus_follows_mouse no - -#: Set the active window to the window under the mouse when moving the -#: mouse around - -pointer_shape_when_grabbed arrow - -#: The shape of the mouse pointer when the program running in the -#: terminal grabs the mouse. Valid values are: arrow, beam and hand - -default_pointer_shape beam - -#: The default shape of the mouse pointer. Valid values are: arrow, -#: beam and hand +focus_follows_mouse yes +default_pointer_shape beam +pointer_shape_when_grabbed arrow pointer_shape_when_dragging beam -#: The default shape of the mouse pointer when dragging across text. -#: Valid values are: arrow, beam and hand - #: }}} #: Performance tuning {{{ @@ -372,254 +95,47 @@ sync_to_monitor yes #: Terminal bell {{{ -enable_audio_bell yes - -#: Enable/disable the audio bell. Useful in environments that require -#: silence. - -visual_bell_duration 0.0 - -#: Visual bell duration. Flash the screen when a bell occurs for the -#: specified number of seconds. Set to zero to disable. - +enable_audio_bell no window_alert_on_bell yes - -#: Request window attention on bell. Makes the dock icon bounce on -#: macOS or the taskbar flash on linux. - -bell_on_tab yes - -#: Show a bell symbol on the tab if a bell occurs in one of the -#: windows in the tab and the window is not the currently focused -#: window - -command_on_bell none - -#: Program to run when a bell occurs. +bell_on_tab yes +command_on_bell none #: }}} #: Window layout {{{ -remember_window_size yes -initial_window_width 640 -initial_window_height 400 - -#: If enabled, the window size will be remembered so that new -#: instances of kitty will have the same size as the previous -#: instance. If disabled, the window will initially have size -#: configured by initial_window_width/height, in pixels. You can use a -#: suffix of "c" on the width/height values to have them interpreted -#: as number of cells instead of pixels. +remember_window_size no +initial_window_width 80c +initial_window_height 24c +#: See https://sw.kovidgoyal.net/kitty/index.html#layouts. enabled_layouts * -#: The enabled window layouts. A comma separated list of layout names. -#: The special value all means all layouts. The first listed layout -#: will be used as the startup layout. Default configuration is all -#: layouts in alphabetical order. For a list of available layouts, see -#: the https://sw.kovidgoyal.net/kitty/index.html#layouts. - -window_resize_step_cells 2 -window_resize_step_lines 2 - -#: The step size (in units of cell width/cell height) to use when -#: resizing windows. The cells value is used for horizontal resizing -#: and the lines value for vertical resizing. - -window_border_width 0.5pt - -#: The width of window borders. Can be either in pixels (px) or pts -#: (pt). Values in pts will be rounded to the nearest number of pixels -#: based on screen resolution. If not specified the unit is assumed to -#: be pts. Note that borders are displayed only when more than one -#: window is visible. They are meant to separate multiple windows. - -draw_minimal_borders yes - -#: Draw only the minimum borders needed. This means that only the -#: minimum needed borders for inactive windows are drawn. That is only -#: the borders that separate the inactive window from a neighbor. Note -#: that setting a non-zero window margin overrides this and causes all -#: borders to be drawn. - -window_margin_width 0 - -#: The window margin (in pts) (blank area outside the border). A -#: single value sets all four sides. Two values set the vertical and -#: horizontal sides. Three values set top, horizontal and bottom. Four -#: values set top, right, bottom and left. - -single_window_margin_width -1 - -#: The window margin (in pts) to use when only a single window is -#: visible. Negative values will cause the value of -#: window_margin_width to be used instead. A single value sets all -#: four sides. Two values set the vertical and horizontal sides. Three -#: values set top, horizontal and bottom. Four values set top, right, -#: bottom and left. - -window_padding_width 0 - -#: The window padding (in pts) (blank area between the text and the -#: window border). A single value sets all four sides. Two values set -#: the vertical and horizontal sides. Three values set top, horizontal -#: and bottom. Four values set top, right, bottom and left. - -placement_strategy center - -#: When the window size is not an exact multiple of the cell size, the -#: cell area of the terminal window will have some extra padding on -#: the sides. You can control how that padding is distributed with -#: this option. Using a value of center means the cell area will be -#: placed centrally. A value of top-left means the padding will be on -#: only the bottom and right edges. - -active_border_color #00ff00 - -#: The color for the border of the active window. Set this to none to -#: not draw borders around the active window. - -inactive_border_color #cccccc - -#: The color for the border of inactive windows - -bell_border_color #ff5a00 - -#: The color for the border of inactive windows in which a bell has -#: occurred - -inactive_text_alpha 1.0 - -#: Fade the text in inactive windows by the specified amount (a number -#: between zero and one, with zero being fully faded). - -hide_window_decorations no - -#: Hide the window decorations (title-bar and window borders) with -#: yes. On macOS, titlebar-only can be used to only hide the titlebar. -#: Whether this works and exactly what effect it has depends on the -#: window manager/operating system. - -resize_debounce_time 0.1 - -#: The time (in seconds) to wait before redrawing the screen when a -#: resize event is received. On platforms such as macOS, where the -#: operating system sends events corresponding to the start and end of -#: a resize, this number is ignored. - resize_draw_strategy static +resize_debounce_time 0.00 +placement_strategy top-left +resize_in_steps no -#: Choose how kitty draws a window while a resize is in progress. A -#: value of static means draw the current window contents, mostly -#: unchanged. A value of scale means draw the current window contents -#: scaled. A value of blank means draw a blank window. A value of size -#: means show the window size in cells. - -resize_in_steps no - -#: Resize the OS window in steps as large as the cells, instead of -#: with the usual pixel accuracy. Combined with an -#: initial_window_width and initial_window_height in number of cells, -#: this option can be used to keep the margins as small as possible -#: when resizing the OS window. Note that this does not currently work -#: on Wayland. - -confirm_os_window_close 0 - -#: Ask for confirmation when closing an OS window or a tab that has at -#: least this number of kitty windows in it. A value of zero disables -#: confirmation. This confirmation also applies to requests to quit -#: the entire application (all OS windows, via the quit action). +confirm_os_window_close 2 #: }}} #: Tab bar {{{ -tab_bar_edge bottom - -#: Which edge to show the tab bar on, top or bottom - +tab_bar_style powerline +tab_bar_edge bottom +tab_bar_min_tabs 2 tab_bar_margin_width 0.0 +tab_switch_strategy previous -#: The margin to the left and right of the tab bar (in pts) - -tab_bar_style fade - -#: The tab bar style, can be one of: fade, separator, powerline, or -#: hidden. In the fade style, each tab's edges fade into the -#: background color, in the separator style, tabs are separated by a -#: configurable separator, and the powerline shows the tabs as a -#: continuous line. If you use the hidden style, you might want to -#: create a mapping for the select_tab action which presents you with -#: a list of tabs and allows for easy switching to a tab. - -tab_bar_min_tabs 2 - -#: The minimum number of tabs that must exist before the tab bar is -#: shown - -tab_switch_strategy previous - -#: The algorithm to use when switching to a tab when the current tab -#: is closed. The default of previous will switch to the last used -#: tab. A value of left will switch to the tab to the left of the -#: closed tab. A value of right will switch to the tab to the right of -#: the closed tab. A value of last will switch to the right-most tab. - -tab_fade 0.25 0.5 0.75 1 - -#: Control how each tab fades into the background when using fade for -#: the tab_bar_style. Each number is an alpha (between zero and one) -#: that controls how much the corresponding cell fades into the -#: background, with zero being no fade and one being full fade. You -#: can change the number of cells used by adding/removing entries to -#: this list. - -tab_separator " ┇" - -#: The separator between tabs in the tab bar when using separator as -#: the tab_bar_style. - -tab_activity_symbol none - -#: Some text or a unicode symbol to show on the tab if a window in the -#: tab that does not have focus has some activity. - -tab_title_template "{title}" - -#: A template to render the tab title. The default just renders the -#: title. If you wish to include the tab-index as well, use something -#: like: {index}: {title}. Useful if you have shortcuts mapped for -#: goto_tab N. In addition you can use {layout_name} for the current -#: layout name and {num_windows} for the number of windows in the tab. -#: Note that formatting is done by Python's string formatting -#: machinery, so you can use, for instance, {layout_name[:2].upper()} -#: to show only the first two letters of the layout name, upper-cased. -#: If you want to style the text, you can use styling directives, for -#: example: {fmt.fg.red}red{fmt.fg.default}normal{fmt.bg._00FF00}green -#: bg{fmt.bg.normal}. Similarly, for bold and italic: -#: {fmt.bold}bold{fmt.nobold}normal{fmt.italic}italic{fmt.noitalic}. +tab_activity_symbol none +#: Template supporting {index}, {title}, {num_windows}, some formatting options +#: are also available. +#: See https://sw.kovidgoyal.net/kitty/conf.html#opt-kitty.tab_title_template +tab_title_template "{title}" active_tab_title_template none -#: Template to use for active tabs, if not specified falls back to -#: tab_title_template. - -active_tab_foreground #000 -active_tab_background #eee -active_tab_font_style bold-italic -inactive_tab_foreground #444 -inactive_tab_background #999 -inactive_tab_font_style normal - -#: Tab bar colors and styles - -tab_bar_background none - -#: Background color for the tab bar. Defaults to using the terminal -#: background color. - #: }}} #: Color scheme {{{ @@ -789,7 +305,7 @@ close_on_child_death no #: to yes means that any background processes still using the terminal #: can fail silently because their stdout/stderr/stdin no longer work. -allow_remote_control no +allow_remote_control yes #: Allow other programs to control kitty. If you turn this on other #: programs can control all aspects of kitty, including sending text @@ -816,7 +332,7 @@ listen_on none #: remote control. See the help for kitty --listen-on for more #: details. -# env +# env #: Specify environment variables to set in all child processes. Note #: that environment variables are expanded recursively, so if you