Install Alacritty

Posted on  by 

There are advantages to using Alacritty, and many of Alacritty's features were inspired by termite. The reason for installing termite is this: If you use Alacritty on a Pi 4, but want to SSH into the Pi 4 via a Pi Zero, your keyboard is going to be janked up. So you will need to install the termite-terminfo. Windows Terminal terminus alacritty Extraterm More than 1 year has passed since last update. 以前の記事 で、Hyper を使うようにしていたが、最近もっと良いものがないか探した。. This simple tutorial shows how to install the fastest terminal emulator, Alacritty, in Ubuntu 20.04, Ubuntu 20.10, Linux Mint 20 via PPA. Alacritty is a cross-platform, GPU-accelerated terminal emulator works on macOS, Linux, BSD, and Windows. It’s free and open-source software that strongly focus on simplicity and performance. Alacritty can be installed using package managers on Linux, BSD, macOS and Windows. To install Alacritty on Linux, run the following commands depending on your distribution. Note that some distributions already include Alacritty binaries in their repository. If not you can run the below commands to install. Install Alacritty on Mac OS I’m on Mac, so this install guide is Mac-centric, but see the Alacritty repo for more installation instructions. Since Alacritty is a GUI app (icon in the Applications directory), in Homebrew-land this means it’s a 'cask', and has to be installed with the -cask flag: $ brew install -cask -no-quarantine alacritty.

Alacritty, the nihilist terminal setup

Alacritty is a suckless terminal emulator written in Rust, it’s extremely fast and very simple. Here’s how to install and configure it.

What is a suckless program?

Software with a focus on simplicity, clarity, and frugality.

Meaning, for example, that Alacritty will never 'call home' to gather telemetry, aka track you. It will never haze you with automated update notices. There’s no package manager, there’s no GUI for settings, nor for menus, it doesn’t have tabs, there’s nothing... just a void of pure, unadulterated nihilism.

Alacritty windows

This either sucks less, or sucks more, depending on your personality.

Install Alacritty on Mac OS

I’m on Mac, so this install guide is Mac-centric, but see the Alacritty repo for more installation instructions.

Since Alacritty is a GUI app (icon in the Applications directory), in Homebrew-land this means it’s a 'cask', and has to be installed with the --cask flag:

The --no-quarantine option is needed because Alacritty isn’t part of the Apple developer program. Otherwise you might get this error:

Check your version with the capital V:

And upgrade Alacritty if needed:

Setup terminfo

From the docs:

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.

Alacritty Download

I’ve used Alacritty successfully without terminfo, though.

Test if you got terminfo installed:

Clone Alacritty because we need bits from it, and hop into the dir:

Then setup terminfo:

Configuring Alacritty

Config is done with a YAML file that lives in ~/.config/alacritty/alacritty.yml. This is great, because now you can keep the config in your dotfiles and share it between machines, which you can’t do with iTerm for example.

Install alacritty macos

My config is pretty default, but I’ve cherry picked few things to highlight here. See the full config below.

Copying with mouse

Copy the selected text to system clipboard without having to press Cmd/Ctrl+c:

Remapping alt for your keyboard layout

This mapping is for British keyboard layout. This is needed so that you can type hashes in Vim for example, which is Alt+3.

See this thread in GitHub for more examples. And a this Wiki entry for more keyboard configs for layouts like German, Swiss, Italian, Spanish, Portuguese...

Handle fish shell

If you’re on fish, tell Alacritty about it:

Get the path to your fish with $ which fish.

Then set the fish completion by grabbing the alacritty.fish completion mapping from the Alacritty repo we cloned earlier:

Clickable URLs

Make URLs clickable when Cmd is held down:

But why can’t I click URLs even if I have configured it the right way? You might be in a tmux session and have the mouse mode enabled, which captures clicks before Alactitty can see them. The mouse mode can disabled by pressing Shift, so Cmd+Shift click, should work.

Color themes

See a selection of color themes in the Alacritty repo.

Full config file

This is my full config at the time of writing this:

See all the options in the freshest config file on the releases page in Alacritty GitHub.

Keyboard shortcuts

Here’s the default ones on Mac:

KeyCommand
Cmd+0ResetFontSize
Cmd+EqualsIncreaseFontSize
Cmd+PlusIncreaseFontSize
Cmd+MinusDecreaseFontSize
Cmd+KClearHistory
Cmd+VPaste
Cmd+CCopy
Cmd+CClearSelection
Cmd+HHide
Cmd+MMinimize
Cmd+QQuit
Cmd+WQuit
Cmd+NSpawnNewInstance
Cmd/Ctrl+FToggleFullscreen
Cmd+FSearchForward
Cmd+BSearchBackward

You can’t pull down 'File' and choose 'New Window', but there’s a default keybinding spawn an new instance Cmd+N. That can be remapped to Cmd+Shift+N for example, with the pipe | you can add modifiers:

The Vi mode

Alactitty has Vi mode. Meaning: you can navigate the prompt with hjkl like in Vim. You can turn the Vi mode with Ctrl+Shift+Space, and exit the Vi mode with the same shortcut.

To copy text in Vi mode, press v and highlight the text you want, then press y (yank) to copy it to your systems clipboard. You can also use mouse to copy text like a normal person.

Using Alacritty

It’s a terminal emulator, so you don’t really use it, you use other programs with it. But you can issue the alacritty command, which will pop out a new window:

You can also start a new Alacritty session using a different config file:

Check the help to see all the flags and options:

Juice it up with Tmux

Since Alacritty is so frugal with features, you really need Tmux (or screen) to go with it.

I have a full post about tmux which has all the good stuff.

Read more:How to install and use tmux

But below is the really basics.

Install:

Pop open a tmux session:

Tmux is all about the keyboard shortcuts, everything starts with a Ctrl+b then followed by a key. For example Ctrl+b % splits your pne into two. Ctrl+b c opens a new window (analogous to a tab). Ctrl+b n goes to the next window, Ctrl+b p to the previous. Check out my above mentioned post about tmux for more details.

Conclusions

Alacritty is pretty easy in the sense that you set it and forget it, it doesn’t need much attention. It took me a while to figure out tmux, though. But tmux is a good program to know, you can carry that knowledge over to other environments.

And by the way; even tho I say it’s 'nihilist', I really love Alacritty ❤️

Alacritty
Original author(s)Joe Wilm[1]
Developer(s)Kirill Chibisov, Christian Dürr[2]
Stable release
Repository
Written inRust
Operating systemmacOS, Linux, Microsoft Windows, FreeBSD
Platformx86-64, IA-32
LicenseApache Software License, Version 2.0

Alacritty is a free and open-sourceGPU accelerated terminal emulator focused on performance and simplicity. Consequently, it does not support tabs or splits and is configured by editing a text file. It is written in Rust and uses OpenGL (for performance).[4][5][6]. Similar terminal emulator that uses OpenGL is Kitty.

Alacritty is the default terminal emulator in Sway.[7]

History[edit]

Joe Wilm announced Alacritty in his blog on 6 January 2017. He describes it as 'the result of frustration with existing terminal emulators. Using vim inside tmux in many terminals was a particularly bad experience. None of them were ever quite fast enough'. He found urxvt and st difficult to configure and criticized their 'inability to run on non-X11 platforms'.[1]

With the release of version 0.2.0 in September 2018 Alacritty gained support for scrollback.[8]

In version 0.3.0, released in April 2019, Alacritty entered beta stage and support for Windows, text reflow, and clicking on URLs was added.[9]

In version 0.5.0, released in July 2020, a mode with vi keybindings for searching and copying text was added.[10]

In version 0.6.0, released in November 2020, a new Ctrl+C binding to cancel search and leave vi mode was added.[11]

Features[edit]

Alacritty supports true color in addition to the standard 16 ANSI colors.[12]

Alacritty explicitly does not support tabs or splits because similar functionality can be achieved with a terminal multiplexer or window manager.[13][14]

Configuration[edit]

Alacritty is configured by editing a template file in YAML format, for example:[5]

See also[edit]

References[edit]

  1. ^ abWilm, Joe (2017-01-06). 'Announcing Alacritty, a GPU-accelerated terminal emulator'. jwilm.io. Retrieved 2020-07-28.
  2. ^https://www.openhub.net/p/alacritty/contributors
  3. ^'Release 0.7.2'. 20 February 2021. Retrieved 9 March 2021.
  4. ^Senthil Kumar Palani (2019-10-29). 'Alacritty – A Lightweight And Blazingly Fast Terminal Emulator'. OSTechNix. Retrieved 2020-07-27.
  5. ^ abangeloma17 (2020-03-18). 'Alacritty the fastest terminal emulator for Linux'. OSRadar. Retrieved 2020-07-27.
  6. ^Morelo, David. 'Top 7 Best Linux Terminals – Linux Hint'. Retrieved 2020-07-27.
  7. ^DeVault, Drew (2019-09-26). 'config.in: set default term to alacritty'.
  8. ^Wilm, Joe (2018-09-17). 'Alacritty now supports scrollback'. jwilm.io. Retrieved 2020-07-28.
  9. ^Dürr, Christian (2019-04-07). 'Alacritty Version 0.3.0 Release'. Retrieved 2020-07-28.
  10. ^Dürr, Christian (2020-07-31). 'Alacritty Version 0.5.0 Release'. christianduerr.com. Archived from the original on 2020-08-01. Retrieved 2020-08-01.
  11. ^'Release Alacritty Version 0.6.0'. GitHub. Retrieved 2020-12-19.
  12. ^Beaupré, Antoine (2018-03-30). 'A look at terminal emulators, part 1'. LWN.net. Retrieved 2020-07-28.
  13. ^https://github.com/alacritty/alacritty/tree/v0.4.3#faq
  14. ^Kili, Aaron (2020-06-05). 'Alacritty – A Fastest Terminal Emulator for Linux'. TecMint. Retrieved 2020-07-28.

Install Alacritty Arch


Retrieved from 'https://en.wikipedia.org/w/index.php?title=Alacritty&oldid=1016537372'

Coments are closed