From e8a865e151f131dd503de259cc56fed831e50740 Mon Sep 17 00:00:00 2001 From: retrilzzy Date: Mon, 22 Sep 2025 21:23:48 +0500 Subject: [PATCH] =?UTF-8?q?=D0=A0=D0=B5=D1=84=D0=B0=D0=BA=D1=82=D0=BE?= =?UTF-8?q?=D1=80=20=D0=BE=D1=81=D0=BD=D0=BE=D0=B2=D0=BD=D0=BE=D0=B3=D0=BE?= =?UTF-8?q?=20=D0=BA=D0=BE=D0=BD=D1=84=D0=B8=D0=B3=D0=B0=20Kitty?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Configs/.config/kitty/kitty.conf | 239 +++++-------------------------- 1 file changed, 38 insertions(+), 201 deletions(-) diff --git a/Configs/.config/kitty/kitty.conf b/Configs/.config/kitty/kitty.conf index db287e5..6eb26b3 100644 --- a/Configs/.config/kitty/kitty.conf +++ b/Configs/.config/kitty/kitty.conf @@ -1,264 +1,101 @@ # vim:fileencoding=utf-8:foldmethod=marker +# kitty config: https://sw.kovidgoyal.net/kitty/conf/ -# https://sw.kovidgoyal.net/kitty/conf/ - -# To get a full list of supported fonts use the `kitty +list-fonts` command. -font_family family="MesloLGS NF" +### Fonts ### +font_family MesloLGS NF bold_font auto italic_font auto bold_italic_font auto font_size 13 +### Scrollback ### scrollback_lines 8000 - +strip_trailing_spaces never +select_by_word_characters @-./_~?&=%+# paste_actions quote-urls-at-prompt -strip_trailing_spaces never - -select_by_word_characters @-./_~?&=%+# - -show_hyperlink_targets yes - -remote_kitty if-needed - -# 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 - +### Window ### hide_window_decorations yes - 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 -#enabled_layouts all - -# Send a notification when a command takes more than 30 seconds in a invisible window -#notify_on_cmd_finish invisible 30.0 - -# 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_border_width 0.5pt 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 0 - 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}" +### Layouts ### +enabled_layouts splits,stack +include splits.conf -#: The foreground and background colors +### Mouse ### +mouse_map left click ungrabbed no-op +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 +### Background ### 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. - - +### Remote / Hyperlinks ### +remote_kitty if-needed +share_connections yes 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 +allow_hyperlinks yes +# listen_on unix:$XDG_RUNTIME_DIR/kitty.sock 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 ### 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 - +### Hotkeys ### 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 +# Disable accidental window creation map kitty_mod+enter no-op map cmd+enter no-op - +# Window / tab management (tmux-like) 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 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 +2.0 -map ctrl+plus change_font_size all +2.0 -map ctrl+kp_add change_font_size all +2.0 - - -#: Decrease font size +# Font size +map ctrl+equal change_font_size all +2.0 +map ctrl+plus change_font_size all +2.0 +map ctrl+kp_add change_font_size all +2.0 map ctrl+minus change_font_size all -2.0 map ctrl+kp_subtract change_font_size all -2.0 +map ctrl+0 change_font_size all 0 - -#: Reset font size -map ctrl+0 change_font_size all 0 - - +# Fullscreen map f11 toggle_fullscreen - -# map ctrl+a>e edit_config_file +# Config management map ctrl+a>e no-op map ctrl+a>shift+e launch --type=tab nvim ~/.config/kitty/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"' +map ctrl+a>shift+d debug_config - -#: 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 +### Themes ### include current-theme.conf -# 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 +### Hints ### 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) +# Double ctrl+a -> send ^A (like tmux) map ctrl+a>ctrl+a send_text all \x01