# vim:fileencoding=utf-8:foldmethod=marker # https://sw.kovidgoyal.net/kitty/conf/ # To get a full list of supported fonts use the `kitty +list-fonts` command. #font_family IosevkaTerm Nerd Font font_family JetBrainsMono Nerd Font font_size 11.0 scrollback_lines 8000 paste_actions quote-urls-at-prompt strip_trailing_spaces never select_by_word_characters @-./_~?&=%+# show_hyperlink_targets yes remote_kitty if-needed enable_audio_bell no # https://sw.kovidgoyal.net/kitty/kittens/ssh/#opt-kitten-ssh.share_connections share_connections yes # unmap left click for open link (easy miss click) mouse_map left click ungrabbed no-op #: Click the link under the mouse or move the cursor mouse_map ctrl+left click ungrabbed mouse_handle_click selection link prompt mouse_map ctrl+left press ungrabbed mouse_selection normal mouse_map right press ungrabbed copy_to_clipboard 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. # fat -- One (or optionally more) windows are shown full width on the top, the rest of the windows are shown side-by-side on the bottom # grid -- All windows are shown in a grid # horizontal -- All windows are shown side-by-side # splits -- Windows arranged in arbitrary patterns created using horizontal and vertical splits # stack -- Only a single maximized window is shown at a time # tall -- One (or optionally more) windows are shown full height on the left, the rest of the windows are shown one below the other on the right # vertical -- All windows are shown one below the other enabled_layouts splits,stack,fat,tall,grid #enabled_layouts all # https://sw.kovidgoyal.net/kitty/layouts/#the-splits-layout include splits.conf #: 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/overview/#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 kitty windows in a layout with the keyboard #: (start_resizing_window). The cells value is used for horizontal #: resizing and the lines value for vertical resizing. window_border_width 0.5pt visual_window_select_characters 1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ #: The list of characters to use for visual window selection (for #: example for selecting a window to focus with focus_visible_window). #: The value should be a series of unique numbers or alphabets, case #: insensitive, from the set [0-9A-Z]. Specify your preference as a #: string of characters. # with Shell integration enabled, using negative values means windows sitting at a shell prompt are not counted, # only windows where some command is currently running. # see https://sw.kovidgoyal.net/kitty/conf/#opt-kitty.confirm_os_window_close confirm_os_window_close -1 tab_bar_style powerline # emoji from https://emojipedia.org/regional-indicator-symbol-letter-z/ # title parse see https://github.com/kovidgoyal/kitty/blob/587f44ad4eb7fe545b0e580168cf0c32117b87c7/kitty/tab_bar.py#L175 tab_title_template "{fmt.fg.red}{bell_symbol}{activity_symbol}{fmt.fg.tab}{index}:{'🇿' if layout_name == 'stack' and num_windows > 1 else ''}{title}" #: The foreground and background colors #background_opacity 0.95 background_opacity 1.0 background_image none #: Path to a background image. Must be in PNG format. background_image_layout tiled #: Whether to tile, scale or clamp the background image. The value can #: be one of tiled, mirror-tiled, scaled, clamped. background_image_linear no #: When background image is scaled, whether linear interpolation #: should be used. dynamic_background_opacity yes #: Allow changing of the background_opacity dynamically, using either #: keyboard shortcuts (increase_background_opacity and #: decrease_background_opacity) or the remote control facility. #: Changing this setting by reloading the config is not supported. 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 #: to kitty windows, opening new windows, closing windows, reading the #: content of windows, etc. Note that this even works over ssh #: connections. You can chose to either allow any program running #: within kitty to control it, with yes or only programs that connect #: to the socket specified with the kitty --listen-on command line #: option, if you use the value socket-only. The latter is useful if #: you want to prevent programs running on a remote computer over ssh #: from controlling kitty. Reloading the config will not affect this #: setting. #listen_on unix:$XDG_RUNTIME_DIR/kitty.sock #listen_on tcp:localhost:12488 #: Tell kitty to listen to the specified unix/tcp socket for remote #: control connections. Note that this will apply to all kitty #: instances. It can be overridden by the kitty --listen-on command #: line flag. This option accepts only UNIX sockets, such as #: unix:${TEMP}/mykitty or (on Linux) unix:@mykitty. Environment #: variables are expanded. If {kitty_pid} is present then it is #: replaced by the PID of the kitty process, otherwise the PID of the #: kitty process is appended to the value, with a hyphen. This option #: is ignored unless you also set allow_remote_control to enable #: remote control. See the help for kitty --listen-on for more #: details. Changing this option by reloading the config is not #: supported. #startup_session none startup_session session.conf allow_hyperlinks yes #: Process hyperlink (OSC 8) escape sequences. If disabled OSC 8 #: escape sequences are ignored. Otherwise they become clickable #: links, that you can click by with the mouse or the hints kitten #: . The special value of ``ask`` means that kitty #: will ask before opening the link when clicked. shell_integration enabled #: Enable shell integration on supported shells. This enables features #: such as jumping to previous prompts, browsing the output of the #: previous command in a pager, etc. on supported shells. Set to #: ``disabled`` to turn off shell integration, completely. See #: https://sw.kovidgoyal.net/kitty/shell-integration/ for details. #term xterm-kitty term xterm-256color kitty_mod ctrl+shift # kitty_mod has to be modifiers not keys, see # https://github.com/kovidgoyal/kitty/discussions/3457#discussioncomment-587511 # so you can NOT do this: #kitty_mod ctrl+a #map kitty_mod+enter new_window # disable this as can lead to window created by accident via press by ctrl+shift+v paste command and then press enter map kitty_mod+enter no-op map cmd+enter no-op map ctrl+a>x close_window map ctrl+a>] next_window map ctrl+a>[ previous_window map ctrl+a>period move_window_forward map ctrl+a>comma move_window_backward # map kitty_mod+t new_tab_with_cwd map kitty_mod+t new_tab map ctrl+alt+t new_tab_with_cwd # map kitty_mod+t launch --location=hsplit # new_tab will not keep cwd, use `new_tab_with_cwd` instead or `launch --cwd=current --type=tab` # see https://sw.kovidgoyal.net/kitty/faq/#how-do-i-open-a-new-window-or-tab-with-the-same-working-directory-as-the-current-window # tmux like tab create via `--cwd=last_reported`, warning: this need kitty `shell_integration enabled` map ctrl+a>c launch --cwd=last_reported --type=tab map ctrl+a>, set_tab_title #: Increase font size map ctrl+equal change_font_size all +1.0 map ctrl+plus change_font_size all +1.0 map ctrl+kp_add change_font_size all +1.0 #: Decrease font size map ctrl+minus change_font_size all -1.0 map ctrl+kp_subtract change_font_size all -1.0 #: Reset font size map ctrl+0 change_font_size all 0 map f11 toggle_fullscreen # map ctrl+a>e edit_config_file map ctrl+a>e no-op map ctrl+a>shift+e launch --type=tab nvim ~/.config/kitty/kitty.conf #: Reload kitty.conf map ctrl+a>shift+r combine : load_config_file : launch --type=overlay sh -c 'echo "kitty config reloaded."; echo; read -r -p "Press Enter to exit"; echo ""' #: Debug kitty configuration map ctrl+a>shift+d debug_config # BEGIN_KITTY_THEME # Dark One Nuanced include current-theme.conf include ./theme.conf # END_KITTY_THEME # default alphabet see https://github.com/kovidgoyal/kitty/blob/0c4b20aa4e6b29ccf7c389e15d7ff5189f8e98f5/kittens/hints/main.py#L125 # qwerty alphabets borrow from https://github.com/fcsonline/tmux-thumbs#Alphabets map ctrl+a>space kitten hints --alphabet asdfqwerzxcvjklmiuopghtybn1234567890 --customize-processing custom-hints.py map f3 kitten hints --program '*' # https://github.com/console-rs/console/pull/85/files # https://github.com/console-rs/console/pull/84 # map double ctrl+a to ctrl+a (home) map ctrl+a>ctrl+a send_text all \x01