From 84970e14e6f7fdaceac4574bc8e87bf3d1b2dc11 Mon Sep 17 00:00:00 2001 From: aleidk Date: Mon, 3 Feb 2025 12:16:19 -0300 Subject: [PATCH] update kitty config --- config/kitty/kitty.conf | 68 +++++++++++++++---- .../lua/aleidk/plugins-core/smart-splits.lua | 2 + 2 files changed, 56 insertions(+), 14 deletions(-) diff --git a/config/kitty/kitty.conf b/config/kitty/kitty.conf index a40a1bf..f29ca27 100644 --- a/config/kitty/kitty.conf +++ b/config/kitty/kitty.conf @@ -784,7 +784,7 @@ font_size 12.0 #: suffix of "c" on the width/height values to have them interpreted #: as number of cells instead of pixels. -# enabled_layouts * +enabled_layouts fat,tall,stack #: The enabled window layouts. A comma separated list of layout names. #: The special value all means all layouts. The first listed layout @@ -954,7 +954,7 @@ confirm_os_window_close 0 #: Tab bar {{{ -# tab_bar_edge bottom +tab_bar_edge top #: The edge to show the tab bar on, top or bottom. @@ -969,7 +969,7 @@ confirm_os_window_close 0 #: The second number is the margin between the tab bar and the #: contents of the current tab. -# tab_bar_style fade +tab_bar_style separator #: The tab bar style, can be one of: @@ -995,12 +995,12 @@ confirm_os_window_close 0 #: 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_align left +tab_bar_align center #: The horizontal alignment of the tab bar, can be one of: left, #: center, right. -# tab_bar_min_tabs 2 +tab_bar_min_tabs 1 #: The minimum number of tabs that must exist before the tab bar is #: shown. @@ -1022,7 +1022,7 @@ confirm_os_window_close 0 #: can change the number of cells used by adding/removing entries to #: this list. -# tab_separator " ┇" +tab_separator " │ " #: The separator between tabs in the tab bar when using separator as #: the tab_bar_style. @@ -1045,7 +1045,7 @@ confirm_os_window_close 0 #: The maximum number of cells that can be used to render the text in #: a tab. A value of zero means that no limit is applied. -# tab_title_template "{fmt.fg.red}{bell_symbol}{activity_symbol}{fmt.fg.tab}{title}" +tab_title_template "{fmt.fg.red}{bell_symbol}{activity_symbol}{fmt.fg.tab}{index}:{layout_name[0].upper()}:{title}" #: A template to render the tab title. The default just renders the #: title with optional symbols for bell and activity. If you wish to @@ -1355,7 +1355,7 @@ confirm_os_window_close 0 #: See rc_custom_auth for details. -allow_remote_control socket-only +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 @@ -1384,7 +1384,7 @@ allow_remote_control socket-only #: yes #: Remote control requests are always accepted. -listen_on unix:/tmp/kitty +listen_on unix:@mykitty #: Listen to the specified socket for remote control connections. Note #: that this will apply to all kitty instances. It can be overridden @@ -1939,9 +1939,37 @@ wayland_titlebar_color background #: Window management {{{ #: New window +# +# + +map ctrl+j neighboring_window down +map ctrl+k neighboring_window up +map ctrl+h neighboring_window left +map ctrl+l neighboring_window right + +# Unset the mapping to pass the keys to neovim +map --when-focus-on var:IS_NVIM ctrl+j +map --when-focus-on var:IS_NVIM ctrl+k +map --when-focus-on var:IS_NVIM ctrl+h +map --when-focus-on var:IS_NVIM ctrl+l + +# the 3 here is the resize amount, adjust as needed +map alt+j kitten relative_resize.py down 3 +map alt+k kitten relative_resize.py up 3 +map alt+h kitten relative_resize.py left 3 +map alt+l kitten relative_resize.py right 3 + +map --when-focus-on var:IS_NVIM alt+j +map --when-focus-on var:IS_NVIM alt+k +map --when-focus-on var:IS_NVIM alt+h +map --when-focus-on var:IS_NVIM alt+l + # map kitty_mod+enter new_window # map cmd+enter new_window +map ctrl+space>enter new_window +map ctrl+space>s launch --location=vsplit +map ctrl+space>v launch --location=ssplit #:: You can open a new kitty window running an arbitrary program, for #:: example:: @@ -2060,6 +2088,7 @@ wayland_titlebar_color background #: Visually select and focus window # map kitty_mod+f7 focus_visible_window +map ctrl+space>tab focus_visible_window #:: Display overlay numbers and alphabets on the window, and switch #:: the focus to the window when you press the key. When there are @@ -2070,6 +2099,7 @@ wayland_titlebar_color background #: Visually swap window with another # map kitty_mod+f8 swap_with_window +map ctrl+space>ctrl+tab swap_with_window #:: Works like focus_visible_window above, but swaps the window. @@ -2093,6 +2123,7 @@ wayland_titlebar_color background # map kitty_mod+t new_tab # map cmd+t new_tab +map ctrl+space>t new_tab #: Close tab @@ -2115,14 +2146,23 @@ wayland_titlebar_color background # map kitty_mod+alt+t set_tab_title # map shift+cmd+i set_tab_title +map ctrl+space>shift+r set_tab_title #: You can also create shortcuts to go to specific tabs, with 1 being #: the first tab, 2 the second tab and -1 being the previously active #: tab, and any number larger than the last tab being the last tab:: -#: map ctrl+alt+1 goto_tab 1 -#: map ctrl+alt+2 goto_tab 2 +map ctrl+space>1 goto_tab 1 +map ctrl+space>2 goto_tab 2 +map ctrl+space>3 goto_tab 3 +map ctrl+space>4 goto_tab 4 +map ctrl+space>5 goto_tab 5 +map ctrl+space>6 goto_tab 6 +map ctrl+space>7 goto_tab 7 +map ctrl+space>8 goto_tab 8 +map ctrl+space>9 goto_tab 9 +map ctrl+space>0 goto_tab 10 #: Just as with new_window above, you can also pass the name of #: arbitrary commands to run when using new_tab and new_tab_with_cwd. @@ -2137,6 +2177,7 @@ wayland_titlebar_color background #: Next layout # map kitty_mod+l next_layout +map ctrl+space>ctrl+l next_layout #: You can also create shortcuts to switch to specific layouts:: @@ -2154,6 +2195,7 @@ wayland_titlebar_color background #: stack layout:: #: map ctrl+alt+z toggle_layout stack +map ctrl+space>m toggle_layout stack #: }}} #: Font sizes {{{ @@ -2375,6 +2417,7 @@ wayland_titlebar_color background # map kitty_mod+f5 load_config_file # map ctrl+cmd+, load_config_file +map ctrl+space>ctrl+r load_config_file #:: Reload kitty.conf, applying any changes since the last time it #:: was loaded. Note that a handful of options cannot be dynamically @@ -2453,6 +2496,3 @@ wayland_titlebar_color background #: }}} #: }}} - - - diff --git a/config/nvim/lua/aleidk/plugins-core/smart-splits.lua b/config/nvim/lua/aleidk/plugins-core/smart-splits.lua index c58890c..a11d29e 100644 --- a/config/nvim/lua/aleidk/plugins-core/smart-splits.lua +++ b/config/nvim/lua/aleidk/plugins-core/smart-splits.lua @@ -3,6 +3,8 @@ -- Tmux aware return { "mrjones2014/smart-splits.nvim", + lazy = false, + build = './kitty/install-kittens.bash', opts = { ignored_filetypes = { "nofile", "quickfix", "qf", "prompt" }, ignored_buftypes = { "nofile" } }, keys = { {