mirror of
https://github.com/js0ny/dotfiles.git
synced 2025-12-21 08:43:00 +00:00
fix kitty
This commit is contained in:
parent
f56fa1259c
commit
0b6ca6c86e
2 changed files with 53 additions and 73 deletions
|
|
@ -1,52 +1,33 @@
|
||||||
# vim:fileencoding=utf-8:foldmethod=marker
|
# Generated by Home Manager.
|
||||||
|
# See https://sw.kovidgoyal.net/kitty/conf.html
|
||||||
|
font_family Maple Mono NF CN
|
||||||
|
font_size 12
|
||||||
|
|
||||||
# Fonts {{{
|
include current-theme.conf
|
||||||
|
|
||||||
# Family
|
# Shell integration is sourced and configured manually
|
||||||
font_family family="Maple Mono NF CN"
|
shell_integration no-rc
|
||||||
bold_font auto
|
|
||||||
italic_font auto
|
|
||||||
bold_italic_font auto
|
|
||||||
|
|
||||||
# Ligature
|
active_tab_font_style bold
|
||||||
disable_ligatures never
|
allow_remote_control socket-only
|
||||||
font_size 12.0
|
|
||||||
# }}}
|
|
||||||
|
|
||||||
# Text Cursor {{{
|
|
||||||
# Cursor Trail
|
|
||||||
cursor_trail 1
|
cursor_trail 1
|
||||||
cursor_trail_decay 0.1 0.4
|
cursor_trail_decay 0.1 0.4
|
||||||
cursor_trail_start_threshold 2
|
cursor_trail_start_threshold 2
|
||||||
# }}}
|
disable_ligatures never
|
||||||
|
enabled_layouts splits
|
||||||
# Tab Bar {{{
|
listen_on unix:/tmp/kitty.sock
|
||||||
tab_bar_edge top
|
|
||||||
tab_bar_align left
|
|
||||||
tab_bar_style powerline
|
|
||||||
# Hide tab bar when there is only one tab
|
|
||||||
tab_bar_min_tabs 2
|
|
||||||
tab_title_template "{f'{title[:30]}…' if title.rindex(title[-1]) + 1 > 30 else (title.center(6) if (title.rindex(title[-1]) + 1) % 2 == 0 else title.center(5))}"
|
|
||||||
active_tab_font_style bold
|
|
||||||
# }}}
|
|
||||||
|
|
||||||
# Color Scheme {{{
|
|
||||||
# BEGIN_KITTY_THEME
|
|
||||||
# Rosé Pine Dawn
|
|
||||||
include current-theme.conf
|
|
||||||
# END_KITTY_THEME
|
|
||||||
# }}}
|
|
||||||
|
|
||||||
|
|
||||||
# macOS {{{
|
|
||||||
macos_option_as_alt yes
|
macos_option_as_alt yes
|
||||||
macos_quit_when_last_window_closed yes
|
macos_quit_when_last_window_closed yes
|
||||||
# }}}
|
shell zsh
|
||||||
|
tab_bar_align left
|
||||||
|
tab_bar_edge top
|
||||||
|
tab_bar_min_tabs 2
|
||||||
|
tab_bar_style powerline
|
||||||
|
tab_title_template {f'{title[:30]}…' if title.rindex(title[-1]) + 1 > 30 else (title.center(6) if (title.rindex(title[-1]) + 1) % 2 == 0 else title.center(5))}
|
||||||
|
|
||||||
# Keyboard Shortcuts {{{
|
action_alias kitty_scrollback_nvim kitten /home/js0ny/.local/share/nvim/lazy/kitty-scrollback.nvim/python/kitty_scrollback_nvim.py
|
||||||
map alt+t new_tab
|
|
||||||
map alt+w close_tab
|
map alt+0 goto_tab -1
|
||||||
map ctrl+c copy_and_clear_or_interrupt
|
|
||||||
map alt+1 goto_tab 1
|
map alt+1 goto_tab 1
|
||||||
map alt+2 goto_tab 2
|
map alt+2 goto_tab 2
|
||||||
map alt+3 goto_tab 3
|
map alt+3 goto_tab 3
|
||||||
|
|
@ -55,28 +36,24 @@ map alt+5 goto_tab 5
|
||||||
map alt+6 goto_tab 6
|
map alt+6 goto_tab 6
|
||||||
map alt+7 goto_tab 7
|
map alt+7 goto_tab 7
|
||||||
map alt+8 goto_tab 8
|
map alt+8 goto_tab 8
|
||||||
map alt+9 goto_tab -1
|
map alt+9 goto_tab 9
|
||||||
# Leader: ctrl+q
|
map alt+shift+- launch --location=hsplit
|
||||||
# https://github.com/sxyazi/dotfiles
|
map alt+shift+\ launch --location=vsplit
|
||||||
map ctrl+q noop
|
map alt+shift+h move_window left
|
||||||
map ctrl+q>| kitten window.py +split right
|
map alt+shift+j move_window down
|
||||||
map ctrl+q>\ kitten window.py +split right
|
map alt+shift+k move_window up
|
||||||
map ctrl+q>- kitten window.py +split bottom
|
map alt+shift+l move_window right
|
||||||
map ctrl+q>h kitten window.py -jump left
|
map cmd+c copy_and_clear_or_interrupt
|
||||||
map ctrl+q>j kitten window.py -jump bottom
|
map ctrl+c copy_and_clear_or_interrupt
|
||||||
map ctrl+q>k kitten window.py -jump top
|
map ctrl+q>h move_window left
|
||||||
map ctrl+q>l kitten window.py -jump right
|
map ctrl+q>j move_window down
|
||||||
map alt+shift+h kitten window.py -jump left
|
map ctrl+q>k move_window up
|
||||||
map alt+shift+j kitten window.py -jump bottom
|
map ctrl+q>l move_window right
|
||||||
map alt+shift+k kitten window.py -jump top
|
map ctrl+shift+g kitty_scrollback_nvim --config ksb_builtin_last_cmd_output
|
||||||
map alt+shift+l kitten window.py -jump right
|
map ctrl+shift+h kitty_scrollback_nvim
|
||||||
map ctrl+q>shift+H kitten window.py -resize left
|
|
||||||
map ctrl+q>shift+J kitten window.py -resize bottom
|
|
||||||
map ctrl+q>shift+K kitten window.py -resize top
|
|
||||||
map ctrl+q>shift+L kitten window.py -resize right
|
|
||||||
map cmd+enter toggle_layout stack
|
|
||||||
map ctrl+shift+enter toggle_layout stack
|
|
||||||
# }}}
|
|
||||||
|
|
||||||
|
|
||||||
shell zsh
|
env TERM_PROGRAM=kitty
|
||||||
|
|
||||||
|
mouse_map ctrl+shift+right press ungrabbed combine : mouse_select_command_output : kitty_scrollback_nvim --config ksb_builtin_last_visited_cmd_output
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -41,6 +41,9 @@ in {
|
||||||
macos_option_as_alt = true;
|
macos_option_as_alt = true;
|
||||||
macos_quit_when_last_window_closed = true;
|
macos_quit_when_last_window_closed = true;
|
||||||
enabled_layouts = "splits";
|
enabled_layouts = "splits";
|
||||||
|
shell = config.currentUser.defaultShell;
|
||||||
|
allow_remote_control = "socket-only";
|
||||||
|
listen_on = "unix:/tmp/kitty.sock";
|
||||||
};
|
};
|
||||||
keybindings = {
|
keybindings = {
|
||||||
"cmd+c" = "copy_and_clear_or_interrupt";
|
"cmd+c" = "copy_and_clear_or_interrupt";
|
||||||
|
|
@ -55,18 +58,18 @@ in {
|
||||||
"${alt}+8" = "goto_tab 8";
|
"${alt}+8" = "goto_tab 8";
|
||||||
"${alt}+9" = "goto_tab 9"; # if less than 9 tabs, goes to last tab
|
"${alt}+9" = "goto_tab 9"; # if less than 9 tabs, goes to last tab
|
||||||
"${alt}+0" = "goto_tab -1"; # previously active tab
|
"${alt}+0" = "goto_tab -1"; # previously active tab
|
||||||
"${alt}+shift+\\" = "launch --location=hsplit";
|
"${alt}+shift+\\" = "launch --location=vsplit";
|
||||||
"${alt}+shift+-" = "launch --location=vsplit";
|
"${alt}+shift+-" = "launch --location=hsplit";
|
||||||
"ctrl+shift+h" = "kitty_scrollback_nvim";
|
"ctrl+shift+h" = "kitty_scrollback_nvim";
|
||||||
"ctrl+shift+g" = "kitty_scrollback_nvim --config ksb_builtin_last_cmd_output";
|
"ctrl+shift+g" = "kitty_scrollback_nvim --config ksb_builtin_last_cmd_output";
|
||||||
"alt+shift+h" = "move_window left";
|
"alt+shift+h" = "focus left";
|
||||||
"alt+shift+l" = "move_window right";
|
"alt+shift+l" = "focus right";
|
||||||
"alt+shift+k" = "move_window up";
|
"alt+shift+k" = "focus up";
|
||||||
"alt+shift+j" = "move_window down";
|
"alt+shift+j" = "focus down";
|
||||||
"ctrl+q>h" = "move_window left";
|
"ctrl+q>h" = "focus left";
|
||||||
"ctrl+q>l" = "move_window right";
|
"ctrl+q>l" = "focus right";
|
||||||
"ctrl+q>k" = "move_window up";
|
"ctrl+q>k" = "focus up";
|
||||||
"ctrl+q>j" = "move_window down";
|
"ctrl+q>j" = "focus down";
|
||||||
};
|
};
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
mouse_map ctrl+shift+right press ungrabbed combine : mouse_select_command_output : kitty_scrollback_nvim --config ksb_builtin_last_visited_cmd_output
|
mouse_map ctrl+shift+right press ungrabbed combine : mouse_select_command_output : kitty_scrollback_nvim --config ksb_builtin_last_visited_cmd_output
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue