cargo安装
如果只需要一个alacritty的可执行文件的话,可以直接使用cargo安装
# 安装cargosudo apt install cargo# 国内需要配置cargo的国内源,下面编译安装同样需要# 创建~/.cargo/config并写入以下内容[source.crates-io]registry = "https://github.com/rust-lang/crates.io-index"replace-with = 'ustc'[source.ustc]registry = "git://mirrors.ustc.edu.cn/crates.io-index"# 安装alacrittycargo install alacritty# 最后生成的可执行文件在~/.cargo/bin/alacritty, 需要将它复制到PATH中
编译安装
# 克隆git clone https://gitee.com/yaozhijin/alacritty.git# Ubuntu安装dependenciessudo apt-get install cmake pkg-config libfreetype6-dev libfontconfig1-dev libxcb-xfixes0-dev python3 cargo build-essential# 编译cd alacrittycargo build --release #编译好后的文件在target/release/alacritty# 安装到系统,并生成桌面图标sudo cp target/release/alacritty /usr/local/bin # or anywhere else in $PATHsudo cp extra/logo/alacritty-term.svg /usr/share/pixmaps/Alacritty.svgsudo desktop-file-install extra/linux/Alacritty.desktopsudo update-desktop-database
配置文件为
~/.config/alacritty/alacritty.yml,需自己创建,仓库中有模板,我的配置文件请到此处下载
