kitty 简单配置

Last

前言

  • alacritty 一切都好,满足了我的大部分需求,所以即便已然多次看到对于 kitty 的赞美我也没有为之所动。
  • 不过自从我发现 nvim 中的 bufferline 插件的 underline indicator 无法正常显示的原因在于 alacritty 后,我就有些动摇了。尝试一下,又有何妨?

安装 kitty

  • 使用 pacman:
1
sudo pacman -S kitty

配置 kitty

Font

  • 字体相关:
1
2
3
4
font_family      FiraCode Nerd Font
bold_font auto
italic_font auto
bold_italic_font auto
1
font_size 16.0
  • 下划线:
1
2
modify_font underline_thickness 200%
modify_font underline_position 4

Cursor

  • 形状:
1
cursor_shape beam
  • 闪烁频率(0 为不闪烁):
1
cursor_blink_interval 0

Terminal Bell

  • 关闭音效:
1
2
enable_audio_bell no
bell_on_tab no

Keyboard Shortcuts

  • 复制粘贴:
1
2
map ctrl+shift+c  copy_to_clipboard
map ctrl+shift+v paste_from_clipboard

Window Mangement

  • Tab Management:
1
2
3
4
map alt+]             next_tab
map alt+[ previous_tab
map alt+t new_tab
map ctrl+w close_tab

Color Scheme

  • Catppuccin:
  • 使用 kitty 自带的 theme selector:
1
kitty +kitten themes
  • 在其中选择即可。

坎坷

莫名的消息弹窗

  • 在终端切换目录时,会有消息弹窗提示当前目录。
  • 原因是 oh-my-posh 触发了 osc99 相关组件(具体原理不明)。
  • 解决方式:在 theme 的配置文件中将相关变量设置为 false:
1
"osc99": false,

参考 issue

fcitx5 IME

  • kitty 在 x11 桌面环境中默认情况下无法使用输入法,需要设置环境变量:
1
GLFW_IM_MODULE=ibus

参考 issue

  • Title: kitty 简单配置
  • Author: Last
  • Created at : 2023-10-02 23:36:45
  • Link: https://blog.imlast.top/2023/10/02/kitty-configuration/
  • License: This work is licensed under CC BY-NC-SA 4.0.
Comments