From a91671f9fc94ed7ac0cb50a2db02362de986f218 Mon Sep 17 00:00:00 2001 From: grassblock Date: Fri, 17 Jan 2025 13:58:03 +0800 Subject: [PATCH] feat: kitty: style tweaks & add hyperlinked-grep open config --- home/private_dot_config/kitty/kitty.conf | 13 +++++++++++-- home/private_dot_config/kitty/open-actions.conf | 10 ++++++++++ 2 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 home/private_dot_config/kitty/open-actions.conf diff --git a/home/private_dot_config/kitty/kitty.conf b/home/private_dot_config/kitty/kitty.conf index 2c31069..58f1301 100644 --- a/home/private_dot_config/kitty/kitty.conf +++ b/home/private_dot_config/kitty/kitty.conf @@ -10,19 +10,28 @@ background_opacity 0.7 background_blur 16 +# a bit for cursors +cursor_shape block +#cursor_trail 1 + # fonts font_family SpaceMono Nerd Font bold_font auto italic_font auto bold_italic_font auto # for Chinese fonts -# https://josephpei.github.io/2022/04/18/kitty-terminal-%E7%BB%88%E7%AB%AF/ +# https://josephpei.github.io/2022/04/18/kitty-terminal-终端/ symbol_map U+4E00-U+9FFF,U+3400-U+4DBF Sarasa Term SC # tab bar tab_bar_margin_height 2.0 2.0 -tab_bar_style powerline +tab_bar_style slant tab_powerline_style angled +tab_bar_align left + +# window +wayland_titlebar_color background +hide_window_decorations no # click links w/ ctrl+click mouse_map left click ungrabbed diff --git a/home/private_dot_config/kitty/open-actions.conf b/home/private_dot_config/kitty/open-actions.conf new file mode 100644 index 0000000..10f0159 --- /dev/null +++ b/home/private_dot_config/kitty/open-actions.conf @@ -0,0 +1,10 @@ +# Open any file with a fragment in vim, fragments are generated +# by the hyperlink-grep kitten and nothing else so far. +protocol file +fragment_matches [0-9]+ +action launch --type=overlay --cwd=current nvim +${FRAGMENT} -- ${FILE_PATH} + +# Open text files without fragments in the editor +protocol file +mime text/* +action launch --type=overlay --cwd=current -- ${EDITOR} -- ${FILE_PATH}