我的 alacritty 配置

# 实时预览配置项
live_config_reload: true

# 环境变量

env:
  TERM: alacritty

# 窗口设置
window:
  # 窗口标题
  title: Alacritty

  # 是否允许终端应用更改窗口标题
  dynamic_title: true

  # 窗口大小
  dimensions:
    columns: 120
    lines: 40

  # 窗口内边距
  padding:
    x: 0
    y: 0

  # 将终端内容平均分配给 padding
  dynamic_padding: true

  # 窗口位置(根据屏幕像素来调节)
  # 若想水平居中,就先测量出窗体的宽度
  # 然后 桌面宽度 /2 - 窗体宽度 / 2
  # 垂直居中同理
  # 下面是 2560 * 1080 的设置值
  position:
    x: 730
    y: 80

  # 窗口标题栏和边框是否显示(full 或 None)
  decorations: None

  # 窗口透明度
  opacity: 0.85

# 滚动设置
scrolling:
  # 回滚缓冲区最大保存行数
  history: 1000 # 一次回滚几行
  multiplier: 3

# 字体设置
font:
  # 常规字体
  normal:
    # family: "FiraCode Nerd Font Mono"
    # family: "FiraCode Nerd Font"
    # family: "agave Nerd Font Mono"
    family: "agave Nerd Font"
    style: Regular

  # 字大小
  size: 14
  # size: 12

  # 字符间距
  offset:
    x: 0
    # y: 0
    y: 2

  # 细体字渲染(仅 mac 生效)
  use_thin_strokes: true

  # 高亮渲染粗体字
  draw_bold_text_with_bright_colors: true

# 选择相关
selection:
  # 语义单词分割符号
  semantic_escape_chars: ",│`|:\"' ()[]{}<>\t@="

  # 选中文本是否复制到系统剪切板
  save_to_clipboard: true

# 光标相关
cursor:
  # 光标样式
  style:
    # 光标形状
    shape: Block

    # 是否闪烁
    # blinking: Always
    blinking: off

    # 闪烁间隔
    # blink_interval: 200

    # 窗口未聚焦时光标变为空心
    # unfocused_hollow: true

# 鼠标配置
mouse:
  # 打字时隐藏鼠标
  hide_when_typing: true

# 主题设置
# Catppuccin
colors:
  # Default colors
  primary:
    background: "#1E1D2F"
    foreground: "#D9E0EE"

  # Colors the cursor will use if `custom_cursor_colors` is true
  cursor:
    text: "#1E1D2F"
    cursor: "#F5E0DC"

  # Normal colors
  normal:
    black: "#6E6C7E"
    red: "#F28FAD"
    green: "#ABE9B3"
    yellow: "#FAE3B0"
    blue: "#96CDFB"
    magenta: "#F5C2E7"
    cyan: "#89DCEB"
    white: "#D9E0EE"

  # Bright colors
  bright:
    black: "#988BA2"
    red: "#F28FAD"
    green: "#ABE9B3"
    yellow: "#FAE3B0"
    blue: "#96CDFB"
    magenta: "#F5C2E7"
    cyan: "#89DCEB"
    white: "#D9E0EE"

  indexed_colors:
    - { index: 16, color: "#F8BD96" }
    - { index: 17, color: "#F5E0DC" }

# vscode dark
# colors:
#   primary:
#     background: '#1e1e1e'
#     foreground: '#d4d4d4'
#
#   cursor:
#     text: "0x1E1D2F"
#     cursor: '#d4d4d4'
#
#   normal:
#     black:   '#1e1e1e'
#     red:     '#f44747'
#     green:   '#608b4e'
#     yellow:  '#dcdcaa'
#     blue:    '#569cd6'
#     magenta: '#c678dd'
#     cyan:    '#56b6c2'
#     white:   '#d4d4d4'
#
#   bright:
#     black:   '#545454'
#     red:     '#f44747'
#     green:   '#608b4e'
#     yellow:  '#dcdcaa'
#     blue:    '#569cd6'
#     magenta: '#c678dd'
#     cyan:    '#56b6c2'
#     white:   '#d4d4d4'

# 键绑定
key_bindings:
  # # 左移一个字符
  # - { key: H, mods: Alt, chars: "\x1b\x5b\x44" }
  # # 右移一个字符
  # - { key: L, mods: Alt, chars: "\x1b\x5b\x43" }
  # # 上一项
  # - { key: K, mods: Alt, chars: "\x10" }
  # # 下一项
  # - { key: J, mods: Alt, chars: "\x0e" }
  # # 左移动一个词
  # - { key: B, mods: Alt, chars: "\x1b\x5b\x31\x3b\x35\x44" }
  # # 右移动一个单词
  # - { key: W, mods: Alt, chars: "\x1b\x5b\x31\x3b\x35\x43" }
  # # 到开头
  # - { key: B, mods: Control, chars: "\x01" }
  # # 到结尾
  # - { key: E, mods: Control, chars: "\x05" }
  # 复制
  - { key: C, mods: Control|Shift, action: Copy }
  # 粘贴
  - { key: V, mods: Control|Shift, action: Paste }
  # 开启 vi 模式
  - { key: V, mods: Control|Alt, action: ToggleViMode }
  # 到行首
  - { key: H, mods: Shift, mode: Vi, action: FirstOccupied }
  # 到行尾
  - { key: L, mods: Shift, mode: Vi, action: Last }
posted @ 2022-05-30 01:04  云崖先生  阅读(1298)  评论(0)    收藏  举报