Alacritty is a simple, GPU-accelerated terminal emulator written in Rust. It supports scrollback, truecolor, copy/paste, clicking on URLS, and custom key bindings.
Installation
Alacritty のインストール. ターミナルを iTerm2 から Alacritty に乗り換えた。 インストール. MacOS でインストールしたい場合は、 $ brew cask install alacritty 日本語表示. 日本語が表示されなかったので、下記追加。.zshrc export LANG=jaJP.UTF-8 設定変更. 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. I run command in Alacritty, waited to finish and the run in GNOME terminal and the results are next, 23.330s for the Alacritty and 31.844s for the GNOME terminal. I run this test couple of time and every time Alacritty was faster, except once when Alacritty needed a full minute(don’t know why and didn’t happen again).
- 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 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 the alacritty package or alacritty-gitAUR for the development version.
Configuration
Install Alacrity Terminal For Macos Sierra
Alacritty searches for a configuration file at the following places in this order:
$XDG_CONFIG_HOME/alacritty/alacritty.yml
$XDG_CONFIG_HOME/alacritty.yml
$HOME/.config/alacritty/alacritty.yml
$HOME/.alacritty.yml
Copy the example configuration file at /usr/share/doc/alacritty/example/alacritty.yml
to one of those places and uncomment the settings you want to change. Most settings take effect as soon as you save the file.
Colors
See the upstream wiki for a list of available color schemes. If your preferred color scheme is on the list, paste the provided code into your configuration file.
Font
If you do not want to use your system’s default font, you can specify a different font by changing the following lines:
Substitute monospace
with a font name from the output of
Note that some fonts do not provide an Italic
style but an Oblique
style instead.
Tips and tricks
Alacritty Install
Spawn new instance in same directory
Add the following lines to your configuration file to spawn a new instance of Alacritty in the current working directory by pressing Ctrl+Shift+Enter
:
'user@host:cwd' in window title bar
The window title bar shows 'Alacritty' unlike other terminal emulators under Arch, which by default show 'user@host:cwd'. See FS#70752.
If you want the Arch default behavior to apply to all your users in Alacritty, you need to edit your /etc/bash.bashrc
file.
Find the case statements which sets the $PROMPT_COMMAND
for other terminals:
Then edit the line xterm*|rxvt*|Eterm|aterm|kterm|gnome*)
to add alacritty*
so that it reads xterm*|rxvt*|Eterm|alacritty*|aterm|kterm|gnome*)
.
Vi mode and copy/paste
The vi mode allows moving around Alacritty's viewport and scrollback using the keyboard. By default you can toggle it using Ctrl+Shift+Space
. To copy, you can either use a mouse to select and press Ctrl+Shift+c
, or enter Vi mode, start a selection using v
, move around with hjkl
like in vim, and copy the selection with y
. To paste, press Ctrl+Shift+v
. To copy/paste to/from X clipboard, you can use a mouse selection to copy and a middle mouse click to paste.
Troubleshooting
Mouse not working properly in Vim
Add ttymouse=sgr
to your .vimrc
or switch to Neovim. Also see this issue.
Transparent border in dwm
With dwm, alacritty's borders become transparent. Adding this line to drw.c
in the dwm source directory and recompiling fixes the issue:
Terminal functionality unavailable in remote shells
When connecting to a remote system from an Alacritty terminal, for instance over SSH, it can occur that the system does not have an entry for Alacritty in its terminfo database (/usr/share/terminfo/a/alacritty*
). Therefore, all interactive terminal functionality does not work. This can be fixed by copying the terminfo for Alacritty to the remote server, as described in termite#Terminal issues with SSH.
On the local host, using Alacritty:
On the remote host, in the directory where you copied alacritty.terminfo
:
Alternatively, one can set the value of TERM
in the configuration to xterm-256color
instead of the default alacritty
:
Install Alacrity Terminal For Macos Operating System
Requires hardware supporting GLSL 3.30
Install Alacritty On Mac
You can force Alacritty to use software rendering by launching it with the environment variableLIBGL_ALWAYS_SOFTWARE=1
[1]:
No title bar on Wayland GNOME
Install Alacrity Terminal For Macos Catalina
When using Wayland GNOME the title bar could be empty and with strange icons [2].
The factual accuracy of this article or section is disputed.
WAYLAND_DISPLAY
runs the application with XWayland rather than native Wayland. (Discuss in Talk:Alacritty#)The workaround is to launch Alacritty with an empty WAYLAND_DISPLAY
environment variable:
Alacritty For Mac
The factual accuracy of this article or section is disputed.
/usr/share
should not be edited, they will be overwritten when the package is updated. (Discuss in Talk:Alacritty#)It is also possible to replace the two Exec lines in /usr/share/applications/Alacritty.desktop
with this:
Different font size on multiple monitors
By default, Alacritty attempts to scale fonts to the appropriate point size on each monitor based on the Device pixel ratio
. On some setups with multiple displays, this behavior can result in vastly different physical sizes [3], [4].
Alacritty Macos
To view the existing device pixel ratio values for each monitor, run alacritty -v
, move the child window to each monitor, and pay attention to the reported Device pixel ratio
in the parent window.
Forcing a constant device pixel ratio using the WINIT_X11_SCALE_FACTOR
environment variable may be sufficient to fix the different font size issue:
Comments are closed.