[general]
live_config_reload = true
working_directory = "None"  # 使用当前工作目录

[colors]
draw_bold_text_with_bright_colors = false

[colors.bright]
black = "#4d4d4d"
blue = "#a277ff"
cyan = "#61ffca"
green = "#61ffca"
magenta = "#a277ff"
red = "#ff6767"
white = "#edecee"
yellow = "#ffca85"

[colors.cursor]
cursor = "#a277ff"

[colors.normal]
black = "#110f18"
blue = "#a277ff"
cyan = "#61ffca"
green = "#61ffca"
magenta = "#a277ff"
red = "#ff6767"
white = "#edecee"
yellow = "#ffca85"

[colors.primary]
background = "#15141b"
foreground = "#edecee"

[colors.search.focused_match]
background = "#9F7AF5"
foreground = "#ffffff"

[colors.search.matches]
background = "#ffffff"
foreground = "#000000"

[colors.selection]
background = "#29263c"
text = "CellForeground"

[cursor]
style = { shape = "Beam", blinking = "On" }
vi_mode_style = { shape = "Block", blinking = "Off" }
blink_interval = 750  # 光标闪烁速度
unfocused_hollow = true  # 失去焦点时显示空心光标

[font]
size = 17.0
builtin_box_drawing = true  # 使用内置的框线字符，更好的渲染效果

[font.bold]
family = "JetBrains Mono"
style = "Regular"

[font.bold_italic]
family = "JetBrains Mono"
style = "Italic"

[font.glyph_offset]
x = 0
y = 2

[font.italic]
family = "JetBrains Mono"
style = "Italic"

[font.normal]
family = "JetBrains Mono"
style = "Regular"

[font.offset]
x = 0
y = 8

[[keyboard.bindings]]
chars = "\f"
key = "R"
mode = "~Vi|~Search"
mods = "Command"

[[keyboard.bindings]]
action = "ClearHistory"
key = "R"
mode = "~Vi|~Search"
mods = "Command"

[[keyboard.bindings]]
action = "Quit"
key = "W"
mods = "Command|Shift"

[[keyboard.bindings]]
action = "SpawnNewInstance"
key = "N"
mods = "Command"

[[keyboard.bindings]]
action = "Hide"
key = "W"
mods = "Command"

[[keyboard.bindings]]
action = "CreateNewWindow"
key = "T"
mods = "Command"

[[keyboard.bindings]]
chars = "\u001Bb"
key = "Left"
mods = "Alt"

[[keyboard.bindings]]
chars = "\u001Bf"
key = "Right"
mods = "Alt"

[[keyboard.bindings]]
chars = "\u0001"
key = "Left"
mods = "Command"

[[keyboard.bindings]]
chars = "\u0005"
key = "Right"
mods = "Command"

[[keyboard.bindings]]
chars = "\u0015"
key = "Back"
mods = "Command"

[[keyboard.bindings]]
chars = "\u001B\u007F"
key = "Back"
mods = "Alt"

[[keyboard.bindings]]
chars = "\u001Cp"
key = "LBracket"
mods = "Command|Shift"

[[keyboard.bindings]]
chars = "\u001Cn"
key = "RBracket"
mods = "Command|Shift"

[[keyboard.bindings]]
chars = "\u001C1"
key = "Key1"
mods = "Command"

[[keyboard.bindings]]
chars = "\u001C2"
key = "Key2"
mods = "Command"

[[keyboard.bindings]]
chars = "\u001C3"
key = "Key3"
mods = "Command"

[[keyboard.bindings]]
chars = "\u001C4"
key = "Key4"
mods = "Command"

[[keyboard.bindings]]
chars = "\u001C5"
key = "Key5"
mods = "Command"

[[keyboard.bindings]]
chars = "\u001C6"
key = "Key6"
mods = "Command"

[[keyboard.bindings]]
chars = "\u001C7"
key = "Key7"
mods = "Command"

[[keyboard.bindings]]
chars = "\u001C8"
key = "Key8"
mods = "Command"

[[keyboard.bindings]]
chars = "\u001C9"
key = "Key9"
mods = "Command"

[[keyboard.bindings]]
action = "ReceiveChar"
key = "Back"

# Option + Delete 删除前一个单词 (macOS 风格)
[[keyboard.bindings]]
chars = "\u001b\u007f"
key = "Back"
mods = "Alt"

# Command + K 清屏
[[keyboard.bindings]]
chars = "\u000c"
key = "K"
mods = "Command"

# Command + D 水平分屏 (配合 tmux)
[[keyboard.bindings]]
chars = "\u001c\""
key = "D"
mods = "Command"

# Command + Shift + D 垂直分屏 (配合 tmux)
[[keyboard.bindings]]
chars = "\u001c%"
key = "D"
mods = "Command|Shift"

[scrolling]
history = 100000
multiplier = 4

[selection]
save_to_clipboard = true
semantic_escape_chars = ",│`|:\"' ()[]{}<>"

[terminal.shell]
program = "/bin/zsh"
args = ["-l"]  # 作为登录 shell 启动

[window]
decorations = "transparent"
decorations_theme_variant = "Dark"
resize_increments = true
opacity = 1  # 轻微透明度，更现代
blur = true     # macOS 模糊效果
dynamic_title = true  # 动态更新窗口标题

[window.position]
x = 500
y = 400

[window.dimensions]
columns = 120
lines = 24

[window.padding]
x = 20
y = 26
