Skip to content

Instantly share code, notes, and snippets.

@GNURub
Created November 6, 2020 09:58
Show Gist options
  • Select an option

  • Save GNURub/aa20940dc9b48daabebcb72577612335 to your computer and use it in GitHub Desktop.

Select an option

Save GNURub/aa20940dc9b48daabebcb72577612335 to your computer and use it in GitHub Desktop.
Install Alacritty Ubuntu
#!/bin/bash
# This installs alacritty terminal on ubuntu (https://github.com/jwilm/alacritty)
# You have to have rust/cargo installed for this to work
# Install required tools
sudo apt-get install cmake pkg-config libfreetype6-dev libfontconfig1-dev libxcb-xfixes0-dev python3
# Download, compile and install Alacritty
git clone https://github.com/jwilm/alacritty
cd alacritty
cargo build --release
# Copy default config into home dir
cp alacritty.yml ~/.alacritty.yml
# Copy binary to path
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
# Create desktop file
sudo desktop-file-install extra/linux/Alacritty.desktop
sudo update-desktop-database
# Add Man-Page entries
sudo mkdir -p /usr/local/share/man/man1
gzip -c extra/alacritty.man | sudo tee /usr/local/share/man/man1/alacritty.1.gz > /dev/null
# Add shell completion for bash and zsh
mkdir -p ~/.bash_completion
cp extra/completions/alacritty.bash ~/.bash_completion/alacritty
echo "source ~/.bash_completion/alacritty" >> ~/.bashrc
# Use Alacritty as default terminal (Ctrl + Alt + T)
gsettings set org.gnome.desktop.default-applications.terminal exec 'alacritty'
# Remove temporary dir
cd ..
sudo rm -rf alacritty
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment