rydesun/.config/kitty/kitty.conf
2026-06-29 23:01:55 +08:00

74 lines
2.1 KiB
INI
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

allow_remote_control socket-only
listen_on unix:/tmp/kitty
# {{{ 主题
font_size 15
background_opacity 0.95
# 关闭响铃声音
enable_audio_bell no
# 不在系统窗口上报警
window_alert_on_bell no
# 下划线位置(偏下)
modify_font underline_position 3
# Unicode PUA使用Nerd font会覆盖来自其他字体的字形
symbol_map U+E000-U+F8FF Symbols Nerd Font
# }}}
# {{{ Scrollback
# 可回滚的行数默认值为2000
scrollback_lines 20000
# 使用nvim作为scrollback pager需要搭配nvim配置
# https://github.com/mikesmithgh/kitty-scrollback.nvim
action_alias kitty_scrollback_nvim kitten
\ ~/.data/nvim/lazy/kitty-scrollback.nvim/python/kitty_scrollback_nvim.py
# 劫持scrollback默认键位
map kitty_mod+h kitty_scrollback_nvim
map kitty_mod+g kitty_scrollback_nvim --config ksb_builtin_last_cmd_output
mouse_map ctrl+shift+right press ungrabbed combine
\ : mouse_select_command_output
\ : kitty_scrollback_nvim --config ksb_builtin_last_visited_cmd_output
# }}}
# {{{ 按键
kitten_alias hints hints --alphabet ;ajfkdlshgqweruiopzxcvnmtby1230[
# 查看所有按键
map kitty_mod+f2 kitten scripts/list_keys.py
### ctrl+shift组滚屏(可连续击键)
map kitty_mod+f scroll_page_down
map kitty_mod+b scroll_page_up
### 标签页和窗口
map ctrl+g>t detach_tab ask
#### 插入
map ctrl+g>ctrl+w kitten hints --type=word --program -
map ctrl+g>ctrl+l kitten hints --type=line --program -
#### 复制
map ctrl+g>w kitten hints --type=word --program @
map ctrl+g>l kitten hints --type=line --program @
map ctrl+g>u kitten hints --type=url --program @
#### 打开hyperlink (受open-actions.conf控制)
map ctrl+g>ctrl+o kitten hints --type=hyperlink
#### 打开URL文本
map ctrl+g>ctrl+u kitten hints --type=url
#### NOTE: hyperlink和URL文本是不同的东西
#### 用goldendict查询单词
map ctrl+g>ctrl+q kitten hints --type=word --program goldendict
#### 高亮指定文本
map ctrl+g>ctrl+m create_marker
map ctrl+g>shift+m remove_marker
# 其他hints使用默认的快捷键ctrl+shift+p和ctrl+shift+e
# }}}
# vim: foldmethod=marker