Window / Mac 下极简的通用Terminal终端应用——Alacritty
最近一直在找寻一款在Windows和Mac下都通用的终端应用,Windows11自带的Terminal很棒,渲染效果也很好,但是开的窗口多了,还是会占用相当一部分的内存的。而Mac下的Terminal,默认挺好用的,但是渲染效果在和第三方应用融合时,前景背景之类的融合度不高,容易出现颜色Bug,所以我就想看一看有没有一款能够跨平台的终端应用。
这类应用市场上并不少,但是我的定位是,性能要好,速度要快,最好是用Rust或Go编写的,通过AI查询,果然有几款,但是性能最好最极简的,就是Alacritty,内存占用大约在10~20MB。
介绍
- 官网:alacritty.org
- Github: https://github.com/alacritty/alacritty
下载安装包
- brew install alacritty
- 或,直接在官网下载安装包
初始化配置
新建配置文件,这个目录不可以更改。
mkdir ~/.config/alacritty/ & touch ~/.config/alacritty/alacritty.toml
我的配置
[general]
import = [
"~/.config/alacritty/themes/themes/aura.toml"
]
[font]
size = 14.0
[font.normal]
family = "FiraCode Nerd Font Propo Med"
# style = "Regular"
[window]
opacity = 0.6
blur = true
# unfocused_opacity = 0.9
padding = {x = 10, y = 10}
decorations = 'full'
dynamic_title = true
主题
Alacritty官方维护了一个Theme库,你可以直接使用该库中提供的主题,开箱即用。
- Github: https://github.com/alacritty/alacritty-theme
使用:
- 克隆仓库源码
-
# We use Alacritty's default Linux config directory as our storage location here. mkdir -p ~/.config/alacritty/themes git clone https://github.com/alacritty/alacritty-theme ~/.config/alacritty/themes - 添加你喜欢的主题到配置文件 alacritty.toml 中,替换其中的 {theme}值,为主题名即可。
-
[general] import = [ "~/.config/alacritty/themes/themes/{theme}.toml" ]