2020-11-24 11:39:14 -05:00
|
|
|
# Cargo Installation
|
2020-08-07 10:13:41 -04:00
|
|
|
|
|
|
|
If you're just interested in the Alacritty binary and you don't need the
|
|
|
|
[terminfo file](#terminfo), [desktop entry](#desktop-entry),
|
|
|
|
[manual page](#manual-page) or [shell completions](#shell-completions), you can
|
|
|
|
install it directly through cargo:
|
|
|
|
|
|
|
|
```sh
|
|
|
|
cargo install alacritty
|
|
|
|
```
|
|
|
|
|
2021-07-29 09:10:10 -04:00
|
|
|
Note that you will still need to install the dependencies for your OS of choice.
|
|
|
|
Please refer to the [Dependencies](#dependencies) section.
|
|
|
|
|
2018-10-14 17:01:09 -04:00
|
|
|
# Manual Installation
|
|
|
|
|
|
|
|
1. [Prerequisites](#prerequisites)
|
|
|
|
1. [Source Code](#clone-the-source-code)
|
|
|
|
2. [Rust Compiler](#install-the-rust-compiler-with-rustup)
|
|
|
|
3. [Dependencies](#dependencies)
|
|
|
|
1. [Debian/Ubuntu](#debianubuntu)
|
|
|
|
2. [Arch Linux](#arch-linux)
|
|
|
|
3. [Fedora](#fedora)
|
|
|
|
4. [CentOS/RHEL 7](#centosrhel-7)
|
|
|
|
5. [openSUSE](#opensuse)
|
|
|
|
6. [Slackware](#slackware)
|
|
|
|
7. [Void Linux](#void-linux)
|
|
|
|
8. [FreeBSD](#freebsd)
|
|
|
|
9. [OpenBSD](#openbsd)
|
|
|
|
10. [Solus](#solus)
|
|
|
|
11. [NixOS/Nixpkgs](#nixosnixpkgs)
|
|
|
|
12. [Gentoo](#gentoo)
|
2020-05-07 18:32:00 -04:00
|
|
|
13. [Clear Linux](#clear-linux)
|
|
|
|
14. [GNU Guix](#gnu-guix)
|
2020-11-16 11:07:37 -05:00
|
|
|
15. [Alpine Linux](#alpine-linux)
|
|
|
|
16. [Windows](#windows)
|
|
|
|
17. [Other](#other)
|
2018-10-14 17:01:09 -04:00
|
|
|
2. [Building](#building)
|
2022-02-08 06:43:27 -05:00
|
|
|
1. [Linux/Windows/BSD](#linux--windows--bsd)
|
2020-08-07 10:13:41 -04:00
|
|
|
2. [macOS](#macos)
|
|
|
|
3. [Post Build](#post-build)
|
|
|
|
1. [Terminfo](#terminfo)
|
|
|
|
2. [Desktop Entry](#desktop-entry)
|
|
|
|
3. [Manual Page](#manual-page)
|
|
|
|
4. [Shell completions](#shell-completions)
|
|
|
|
1. [Zsh](#zsh)
|
|
|
|
2. [Bash](#bash)
|
|
|
|
3. [Fish](#fish)
|
2018-10-14 17:01:09 -04:00
|
|
|
|
|
|
|
## Prerequisites
|
|
|
|
|
|
|
|
### Clone the source code
|
|
|
|
|
|
|
|
Before compiling Alacritty, you'll have to first clone the source code:
|
|
|
|
|
|
|
|
```sh
|
2020-01-10 20:23:13 -05:00
|
|
|
git clone https://github.com/alacritty/alacritty.git
|
2018-10-14 17:01:09 -04:00
|
|
|
cd alacritty
|
|
|
|
```
|
|
|
|
|
|
|
|
### Install the Rust compiler with `rustup`
|
|
|
|
|
|
|
|
1. Install [`rustup.rs`](https://rustup.rs/).
|
|
|
|
|
|
|
|
3. To make sure you have the right Rust compiler installed, run
|
|
|
|
|
|
|
|
```sh
|
|
|
|
rustup override set stable
|
|
|
|
rustup update stable
|
|
|
|
```
|
|
|
|
|
|
|
|
### Dependencies
|
|
|
|
|
2019-04-09 17:11:54 -04:00
|
|
|
These are the minimum dependencies required to build Alacritty, please note
|
|
|
|
that with some setups additional dependencies might be desired.
|
|
|
|
|
|
|
|
If you're running Wayland with an Nvidia GPU, you'll likely want the EGL
|
|
|
|
drivers installed too (these are called `libegl1-mesa-dev` on Ubuntu).
|
|
|
|
|
2018-10-14 17:01:09 -04:00
|
|
|
#### Debian/Ubuntu
|
|
|
|
|
2020-05-12 11:18:37 -04:00
|
|
|
If you'd like to build a local version manually, you need a few extra libraries
|
|
|
|
to build Alacritty. Here's an apt command that should install all of them. If
|
|
|
|
something is still found to be missing, please open an issue.
|
2018-10-14 17:01:09 -04:00
|
|
|
|
|
|
|
```sh
|
2023-02-15 16:35:13 -05:00
|
|
|
apt install cmake pkg-config libfreetype6-dev libfontconfig1-dev libxcb-xfixes0-dev libxkbcommon-dev python3
|
2018-10-14 17:01:09 -04:00
|
|
|
```
|
|
|
|
|
|
|
|
#### Arch Linux
|
|
|
|
|
|
|
|
On Arch Linux, you need a few extra libraries to build Alacritty. Here's a
|
|
|
|
`pacman` command that should install all of them. If something is still found
|
|
|
|
to be missing, please open an issue.
|
|
|
|
|
|
|
|
```sh
|
2021-09-17 16:53:16 -04:00
|
|
|
pacman -S cmake freetype2 fontconfig pkg-config make libxcb libxkbcommon python
|
2018-10-14 17:01:09 -04:00
|
|
|
```
|
|
|
|
|
|
|
|
#### Fedora
|
|
|
|
|
|
|
|
On Fedora, you need a few extra libraries to build Alacritty. Here's a `dnf`
|
|
|
|
command that should install all of them. If something is still found to be
|
|
|
|
missing, please open an issue.
|
|
|
|
|
|
|
|
```sh
|
2021-07-11 21:34:37 -04:00
|
|
|
dnf install cmake freetype-devel fontconfig-devel libxcb-devel libxkbcommon-devel g++
|
2018-10-14 17:01:09 -04:00
|
|
|
```
|
|
|
|
|
|
|
|
#### CentOS/RHEL 7
|
|
|
|
|
|
|
|
On CentOS/RHEL 7, you need a few extra libraries to build Alacritty. Here's a `yum`
|
|
|
|
command that should install all of them. If something is still found to be
|
|
|
|
missing, please open an issue.
|
|
|
|
|
|
|
|
```sh
|
2021-07-11 21:34:37 -04:00
|
|
|
yum install cmake freetype-devel fontconfig-devel libxcb-devel libxkbcommon-devel xcb-util-devel
|
2018-10-14 17:01:09 -04:00
|
|
|
yum group install "Development Tools"
|
|
|
|
```
|
|
|
|
|
2022-10-07 18:39:06 -04:00
|
|
|
#### RHEL 8
|
|
|
|
|
|
|
|
On RHEL 8, like RHEL 7, you need a few extra libraries to build Alacritty. Here's a `dnf`
|
|
|
|
command that should install all of them. If something is still found to be
|
|
|
|
missing, please open an issue.
|
|
|
|
|
|
|
|
```sh
|
|
|
|
dnf install cmake freetype-devel fontconfig-devel libxcb-devel libxkbcommon-devel
|
|
|
|
dnf group install "Development Tools"
|
|
|
|
```
|
|
|
|
|
2018-10-14 17:01:09 -04:00
|
|
|
#### openSUSE
|
|
|
|
|
|
|
|
On openSUSE, you need a few extra libraries to build Alacritty. Here's
|
|
|
|
a `zypper` command that should install all of them. If something is
|
|
|
|
still found to be missing, please open an issue.
|
|
|
|
|
|
|
|
```sh
|
2021-11-02 17:32:53 -04:00
|
|
|
zypper install cmake freetype-devel fontconfig-devel libxcb-devel libxkbcommon-devel
|
2018-10-14 17:01:09 -04:00
|
|
|
```
|
|
|
|
|
|
|
|
#### Slackware
|
|
|
|
|
|
|
|
Compiles out of the box for 14.2
|
|
|
|
|
|
|
|
#### Void Linux
|
|
|
|
|
2021-07-08 07:17:50 -04:00
|
|
|
On [Void Linux](https://voidlinux.org), install following packages before
|
2018-10-14 17:01:09 -04:00
|
|
|
compiling Alacritty:
|
|
|
|
|
|
|
|
```sh
|
2019-06-23 11:46:24 -04:00
|
|
|
xbps-install cmake freetype-devel expat-devel fontconfig-devel libxcb-devel pkg-config python3
|
2018-10-14 17:01:09 -04:00
|
|
|
```
|
|
|
|
|
|
|
|
#### FreeBSD
|
|
|
|
|
|
|
|
On FreeBSD, you need a few extra libraries to build Alacritty. Here's a `pkg`
|
|
|
|
command that should install all of them. If something is still found to be
|
|
|
|
missing, please open an issue.
|
|
|
|
|
|
|
|
```sh
|
2021-08-15 11:55:32 -04:00
|
|
|
pkg install cmake freetype2 fontconfig pkgconf python3
|
2018-10-14 17:01:09 -04:00
|
|
|
```
|
|
|
|
|
|
|
|
#### OpenBSD
|
|
|
|
|
2019-06-13 11:28:01 -04:00
|
|
|
On OpenBSD 6.5, you need [Xenocara](https://xenocara.org) and Rust to build
|
|
|
|
Alacritty, plus Python 3 to build its XCB dependency. If something is still
|
|
|
|
found to be missing, please open an issue.
|
2018-10-14 17:01:09 -04:00
|
|
|
|
|
|
|
```sh
|
2019-06-13 11:28:01 -04:00
|
|
|
pkg_add rust python
|
2018-10-14 17:01:09 -04:00
|
|
|
```
|
|
|
|
|
2019-06-13 11:28:01 -04:00
|
|
|
Select the package for Python 3 (e.g. `python-3.6.8p0`) when prompted.
|
|
|
|
|
2019-06-15 16:30:17 -04:00
|
|
|
The default user limits in OpenBSD are insufficient to build Alacritty. A
|
|
|
|
`datasize-cur` of at least 3GB is recommended (see [login.conf](https://man.openbsd.org/login.conf)).
|
|
|
|
|
2018-10-14 17:01:09 -04:00
|
|
|
#### Solus
|
|
|
|
|
|
|
|
On [Solus](https://solus-project.com/), you need a few extra libraries to build
|
|
|
|
Alacritty. Here's a `eopkg` command that should install all of them. If
|
|
|
|
something is still found to be missing, please open an issue.
|
|
|
|
|
|
|
|
```sh
|
2019-06-03 11:18:45 -04:00
|
|
|
eopkg install fontconfig-devel
|
2018-10-14 17:01:09 -04:00
|
|
|
```
|
|
|
|
|
|
|
|
#### NixOS/Nixpkgs
|
|
|
|
|
|
|
|
The following command can be used to get a shell with all development
|
|
|
|
dependencies on [NixOS](https://nixos.org).
|
|
|
|
|
|
|
|
```sh
|
|
|
|
nix-shell -A alacritty '<nixpkgs>'
|
|
|
|
```
|
|
|
|
|
2019-06-03 11:18:45 -04:00
|
|
|
#### Gentoo
|
|
|
|
|
|
|
|
On Gentoo, you need a few extra libraries to build Alacritty. The following
|
|
|
|
command should install all of them. If something is still found to be missing,
|
|
|
|
please open an issue.
|
|
|
|
|
|
|
|
```sh
|
|
|
|
emerge --onlydeps x11-terms/alacritty
|
|
|
|
```
|
|
|
|
|
2020-05-07 18:32:00 -04:00
|
|
|
#### Clear Linux
|
|
|
|
|
|
|
|
On Clear Linux, you need a few extra libraries to build Alacritty. Here's a
|
|
|
|
`swupd` command that should install all of them. If something is still found
|
|
|
|
to be missing, please open an issue.
|
|
|
|
|
|
|
|
```sh
|
|
|
|
swupd bundle-add devpkg-expat devpkg-freetype devpkg-libxcb devpkg-fontconfig
|
|
|
|
```
|
|
|
|
|
2020-02-29 20:33:36 -05:00
|
|
|
#### GNU Guix
|
|
|
|
|
|
|
|
The following command can be used to get a shell with all development
|
|
|
|
dependencies on [GNU Guix](https://guix.gnu.org/).
|
|
|
|
|
|
|
|
```sh
|
|
|
|
guix environment alacritty
|
|
|
|
```
|
|
|
|
|
2020-11-16 11:07:37 -05:00
|
|
|
#### Alpine Linux
|
|
|
|
|
|
|
|
On Alpine Linux, you need a few extra libraries to build Alacritty. Here's an
|
|
|
|
`apk` command that should install all of them. If something is still found to
|
|
|
|
be missing, please open an issue.
|
|
|
|
|
|
|
|
```sh
|
|
|
|
sudo apk add cmake pkgconf freetype-dev fontconfig-dev python3 libxcb-dev
|
|
|
|
```
|
|
|
|
|
2018-10-26 20:49:55 -04:00
|
|
|
#### Windows
|
2018-10-14 17:01:09 -04:00
|
|
|
|
2019-02-02 07:00:29 -05:00
|
|
|
On windows you will need to have the `{architecture}-pc-windows-msvc` toolchain
|
|
|
|
installed as well as [Clang 3.9 or greater](http://releases.llvm.org/download.html).
|
2018-10-14 17:01:09 -04:00
|
|
|
|
|
|
|
#### Other
|
|
|
|
|
|
|
|
If you build Alacritty on another distribution, we would love some help
|
|
|
|
filling in this section of the README.
|
|
|
|
|
|
|
|
## Building
|
|
|
|
|
2022-02-08 06:43:27 -05:00
|
|
|
### Linux / Windows / BSD
|
2018-10-14 17:01:09 -04:00
|
|
|
|
|
|
|
```sh
|
|
|
|
cargo build --release
|
|
|
|
```
|
|
|
|
|
2022-02-08 06:43:27 -05:00
|
|
|
On Linux/BSD, if it is desired to build Alacritty without support for either the
|
|
|
|
X11 or Wayland rendering backend the following commands can be used.
|
|
|
|
|
|
|
|
```sh
|
|
|
|
# Force support for only Wayland
|
|
|
|
cargo build --release --no-default-features --features=wayland
|
|
|
|
|
|
|
|
# Force support for only X11
|
|
|
|
cargo build --release --no-default-features --features=x11
|
|
|
|
```
|
|
|
|
|
2018-10-14 17:01:09 -04:00
|
|
|
If all goes well, this should place a binary at `target/release/alacritty`.
|
|
|
|
|
2020-08-07 10:13:41 -04:00
|
|
|
### macOS
|
2018-10-14 17:01:09 -04:00
|
|
|
|
|
|
|
```sh
|
2020-08-07 10:13:41 -04:00
|
|
|
make app
|
|
|
|
cp -r target/release/osx/Alacritty.app /Applications/
|
2018-10-14 17:01:09 -04:00
|
|
|
```
|
|
|
|
|
2021-08-17 14:04:46 -04:00
|
|
|
#### Universal Binary
|
|
|
|
|
|
|
|
The following will build an executable that runs on both x86 and ARM macos
|
|
|
|
architectures:
|
|
|
|
|
|
|
|
```sh
|
|
|
|
rustup target add x86_64-apple-darwin aarch64-apple-darwin
|
|
|
|
make app-universal
|
|
|
|
```
|
|
|
|
|
2020-08-07 10:13:41 -04:00
|
|
|
## Post Build
|
|
|
|
|
|
|
|
There are some extra things you might want to set up after installing Alacritty.
|
|
|
|
All the post build instruction assume you're still inside the Alacritty
|
|
|
|
repository.
|
|
|
|
|
|
|
|
### Terminfo
|
2020-07-24 12:29:00 -04:00
|
|
|
|
2020-08-07 10:13:41 -04:00
|
|
|
To make sure Alacritty works correctly, either the `alacritty` or
|
|
|
|
`alacritty-direct` terminfo must be used. The `alacritty` terminfo will be
|
|
|
|
picked up automatically if it is installed.
|
2018-10-14 17:01:09 -04:00
|
|
|
|
2020-08-07 10:13:41 -04:00
|
|
|
If the following command returns without any errors, the `alacritty` terminfo is
|
|
|
|
already installed:
|
2018-10-14 17:01:09 -04:00
|
|
|
|
|
|
|
```sh
|
2020-08-07 10:13:41 -04:00
|
|
|
infocmp alacritty
|
2018-10-14 17:01:09 -04:00
|
|
|
```
|
|
|
|
|
2020-08-07 10:13:41 -04:00
|
|
|
If it is not present already, you can install it globally with the following
|
|
|
|
command:
|
|
|
|
|
|
|
|
```
|
|
|
|
sudo tic -xe alacritty,alacritty-direct extra/alacritty.info
|
|
|
|
```
|
2018-10-14 17:01:09 -04:00
|
|
|
|
2020-08-07 10:13:41 -04:00
|
|
|
### Desktop Entry
|
|
|
|
|
|
|
|
Many Linux and BSD distributions support desktop entries for adding applications
|
|
|
|
to system menus. This will install the desktop entry for Alacritty:
|
2018-10-14 17:01:09 -04:00
|
|
|
|
|
|
|
```sh
|
2020-08-07 10:13:41 -04:00
|
|
|
sudo cp target/release/alacritty /usr/local/bin # or anywhere else in $PATH
|
|
|
|
sudo cp extra/logo/alacritty-term.svg /usr/share/pixmaps/Alacritty.svg
|
|
|
|
sudo desktop-file-install extra/linux/Alacritty.desktop
|
|
|
|
sudo update-desktop-database
|
2018-10-14 17:01:09 -04:00
|
|
|
```
|
|
|
|
|
2020-08-07 10:13:41 -04:00
|
|
|
If you are having problems with Alacritty's logo, you can replace it with
|
|
|
|
prerendered PNGs and simplified SVGs available in the `extra/logo/compat`
|
|
|
|
directory.
|
|
|
|
|
|
|
|
### Manual Page
|
2018-10-14 17:01:09 -04:00
|
|
|
|
2023-05-28 06:13:09 -04:00
|
|
|
Installing the manual page requires the additional dependencies `gzip` and `scdoc`.
|
2018-10-14 17:01:09 -04:00
|
|
|
|
|
|
|
```sh
|
|
|
|
sudo mkdir -p /usr/local/share/man/man1
|
2023-05-28 06:13:09 -04:00
|
|
|
scdoc < extra/man/alacritty.1.scd | gzip -c | sudo tee /usr/local/share/man/man1/alacritty.1.gz > /dev/null
|
|
|
|
scdoc < extra/man/alacritty-msg.1.scd | gzip -c | sudo tee /usr/local/share/man/man1/alacritty-msg.1.gz > /dev/null
|
2023-06-11 20:23:41 -04:00
|
|
|
scdoc < extra/man/alacritty.5.scd | gzip -c | sudo tee /usr/local/share/man/man5/alacritty.5.gz > /dev/null
|
|
|
|
scdoc < extra/man/alacritty-bindings.5.scd | gzip -c | sudo tee /usr/local/share/man/man5/alacritty-bindings.5.gz > /dev/null
|
2018-10-14 17:01:09 -04:00
|
|
|
```
|
|
|
|
|
2020-08-07 10:13:41 -04:00
|
|
|
### Shell completions
|
2018-10-14 17:01:09 -04:00
|
|
|
|
2020-08-07 10:13:41 -04:00
|
|
|
To get automatic completions for Alacritty's flags and arguments you can install the provided shell completions.
|
2018-10-14 17:01:09 -04:00
|
|
|
|
2020-08-07 10:13:41 -04:00
|
|
|
#### Zsh
|
2018-10-14 17:01:09 -04:00
|
|
|
|
2019-04-01 18:41:20 -04:00
|
|
|
To install the completions for zsh, you can place the `extra/completions/_alacritty` file in any
|
|
|
|
directory referenced by `$fpath`.
|
2018-10-14 17:01:09 -04:00
|
|
|
|
|
|
|
If you do not already have such a directory registered through your `~/.zshrc`, you can add one like this:
|
|
|
|
|
|
|
|
```sh
|
|
|
|
mkdir -p ${ZDOTDIR:-~}/.zsh_functions
|
|
|
|
echo 'fpath+=${ZDOTDIR:-~}/.zsh_functions' >> ${ZDOTDIR:-~}/.zshrc
|
|
|
|
```
|
|
|
|
|
|
|
|
Then copy the completion file to this directory:
|
|
|
|
|
|
|
|
```sh
|
2019-04-01 18:41:20 -04:00
|
|
|
cp extra/completions/_alacritty ${ZDOTDIR:-~}/.zsh_functions/_alacritty
|
2018-10-14 17:01:09 -04:00
|
|
|
```
|
|
|
|
|
2020-08-07 10:13:41 -04:00
|
|
|
#### Bash
|
2018-10-14 17:01:09 -04:00
|
|
|
|
2019-04-01 18:41:20 -04:00
|
|
|
To install the completions for bash, you can `source` the `extra/completions/alacritty.bash` file
|
|
|
|
in your `~/.bashrc` file.
|
2018-10-14 17:01:09 -04:00
|
|
|
|
|
|
|
If you do not plan to delete the source folder of alacritty, you can run
|
|
|
|
|
|
|
|
```sh
|
2019-04-01 18:41:20 -04:00
|
|
|
echo "source $(pwd)/extra/completions/alacritty.bash" >> ~/.bashrc
|
2018-10-14 17:01:09 -04:00
|
|
|
```
|
|
|
|
|
|
|
|
Otherwise you can copy it to the `~/.bash_completion` folder and source it from there:
|
|
|
|
|
|
|
|
```sh
|
|
|
|
mkdir -p ~/.bash_completion
|
2019-04-01 18:41:20 -04:00
|
|
|
cp extra/completions/alacritty.bash ~/.bash_completion/alacritty
|
2018-10-14 17:01:09 -04:00
|
|
|
echo "source ~/.bash_completion/alacritty" >> ~/.bashrc
|
|
|
|
```
|
|
|
|
|
2020-08-07 10:13:41 -04:00
|
|
|
#### Fish
|
2018-10-14 17:01:09 -04:00
|
|
|
|
2023-03-16 12:02:21 -04:00
|
|
|
To install the completions for fish, from inside the fish shell, run
|
2018-10-14 17:01:09 -04:00
|
|
|
|
|
|
|
```
|
2019-06-30 12:04:09 -04:00
|
|
|
mkdir -p $fish_complete_path[1]
|
|
|
|
cp extra/completions/alacritty.fish $fish_complete_path[1]/alacritty.fish
|
2018-10-14 17:01:09 -04:00
|
|
|
```
|