brew install alacrittybrew install zellij
本文只介绍一些简单的基础配置,主要包含两者结合使用的配置。
Alacritty的配置:
[general]import = [ "~/.config/alacritty/tokyonight_moon.toml", #"~/.config/alacritty/catppuccin-mocha.toml"]live_config_reload = true [env]TERM = "xterm-256color" [window]title = "Alacritty"dimensions = { columns = 0, lines = 0 }padding = { x = 12, y = 10 }dynamic_padding = trueopacity = 1 [font]normal = { family = "CommitMono Nerd Font", style = "Regular" }bold = { family = "CommitMono Nerd Font", style = "Bold" }italic = { family = "CommitMono Nerd Font", style = "Italic" }bold_italic = { family = "CommitMono Nerd Font", style = "Bold Italic" }size = 14 [terminal]shell = { program = "/opt/homebrew/bin/zellij", args = ["options", "--default-shell", "/opt/homebrew/bin/fish"] }
我这里是使用了 Tokyonight的主题,下载之后放到 ~/.config/alacritty/,然后在配置中导入就可以生效。
~/.config/alacritty/
另外 [terminal] 部分是两者结合的关键,这条配置能够在启动Alacritty 的时候自动进入 Zellij 中。
[terminal]
Zellij的配置,只包含了修改的部分:
theme "tokyo-night"default_shell "fish"default_layout "compact"pane_frames false
配置之后效果如下:
这里只是简要介绍了基础配置,更多的内容可以查看 Alacritty和 Zellij的官方文档。