To install the completions for bash, you can source the extra/completions/alacritty.bash file in your /.bashrc file. If you do not plan to delete the source folder of alacritty, you can run echo 'source $ (pwd)/extra/completions/alacritty.bash' /.bashrc Otherwise you can copy it to the /.bashcompletion folder and source it from there. 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. Alacritty is the fastest terminal emulator in existence. Using the GPU for rendering enables optimizations that simply aren't possible without it. Alacritty currently supports macOS, Linux, BSD, and Windows. Alacritty is a terminal emulator with a strong focus on simplicity and performance. Once installed, all you have to do is run alacritty-themes. Choose the theme from the list of options by typing the theme name and press Enter to apply. You can also navigate with j and k keys for up/down. The list of options are cycled through automatically so you can go to the last theme by just pressing up arrow key. Alacritty is a free and open source terminal emulator for Linux, Windows and BSD. It uses GPU for rendering to increase its speed. It comes with vi mode with mimic vi cursor motion, selections and copy text to the clipboard and open URLs.
Install wlroots and sway from source.
Introduction
In this section we are going to build wlroots (required to build sway) and sway from the source repository.
We will be building the latest stable version that seems to be supported by the dependecies in ubuntu 20.04: Sway 1.5.1
Build wlroots
Here we will be building and installing wlroots.
Dependencies
Start by installing the essentials tools, we will be using pip to install an updated version of meson.
Meson
wlroots requires a more up to date version of meson from what ubuntu provides, we will be using pip to install an updated one.
We now need this to be available under PATH:
Add the line at the end of your .bashrc
in your home and source it:
Next are direct dependencies of wlroots:
The next ones are optional dependencies for x11 support, not required if you want a full wayland installation.
If you don't know exactly why you don't need them, I highly encourage you to install them:
Build & Install
Now we will be cloning, building and installing wlroots.
Clone the repo
You can choose the path you prefer for the following steps, I will be working in ~/sway-build
.
Build wlroots
Install wlroots
And that's it, with this you have successfully installed wlroots.
Build Sway
Here we will be building and installing Sway.
Dependencies
The list of what we need now is smaller:
Build & Install
Now we will be cloning, building and installing sway.
Clone the repo
We will be using the path created in the wlroots steps:
Build sway
Install sway
That's it you just installed Sway! 🎉
Sanity Checks & Post Install
Desktop File
You should have this file /usr/local/share/wayland-sessions/sway.desktop
with these contents:
This file is what allows the login manager to select the environment Sway to start at login.
A neat trick is that you can Exec a custom script that sets some environment variables or does something else before starting sway, but we will see other ways to set these variables in further parts of the guide.
Config File
You can copy the default sway config from /usr/local/etc/sway/config
to ~/.config/sway/config
:
This is the file you will be modifying to customize the sway behaviour and keybinds.
note: if you have an i3 config, you can copy that in the same path as above instead of the default one and it should work.
Final dependencies
Whaaat ?? More dependencies ???
Bear with me, the default config expects some programs for some of its configuration, they can be changed but to make it work let's just install them and later we will see replacements.
The missing deps are:
- dmenu: default menu when using
<mod>+d
- swaybg: allows sway to handle background images
- swayidle: allows sway to handle idle functionality
- swaylock: locks the screen
- alacritty: default terminal emulator in sway
You can install them with:
For alacritty, please see the alacritty optional section below before trying sway.
Idle behaviour
You might want to uncomment this exec from the default config to have the idle behaviour you expect of screen locking and screen turn off:
In a later section of the guide we will see how to have a custom behaviour to blur the screen on lock, a totally useless thing but definitely neat.
Start Sway
Now we can finally start sway!
Logout and in the bottom right widget on login select Sway and proceed to login:
You will be greeted by a pretty empty but clean virtual desktop:
To exit Sway you can press the keys <mod>+shift+e
that will bring up a popup where you will have to click with the mouse to confirm:
Now you can experiment with Sway to see if it fits your workflow, with the default config you can use these commands to open a new terminal and close windows:
<mod>+enter
- Open a new terminal<mod>+shift+q
- Close window<mod>+d
- Open dmenu
Great! This concludes the simple install of Sway, if you are interested in some tools and configurations that I find useful for my day to day work, check the Extra section!
I hope you will enjoy this new workflow as much as I do, and if you do not, you learned something new today!
Alacritty (Optional)
The default terminal in the Sway config is Alacritty.
Install
To get an up to date version on Ubuntu you can use the following ppa:
Change default terminal
You don't have to use it and you can change the default by changing this line in the Sway config:
for example to use gnome-terminal:
Why I use it
My personal reason for using alacritty is that I was looking for a minimal terminal to pair with Sway and it supports vi keybinds.
Alacritty Ubuntu
Welcome to the Chocolatey Community Package Repository! The packages found in this section of the site are provided, maintained, and moderated by the community.
Moderation
Every version of each package undergoes a rigorous moderation process before it goes live that typically includes:
- Security, consistency, and quality checking
- Human moderators who give final review and sign off
Install Alacritty Arch
More detail at Security and Moderation.
Organizational Use
If you are an organization using Chocolatey, we want your experience to be fully reliable. Due to the nature of this publicly offered repository, reliability cannot be guaranteed. Packages offered here are subject to distribution rights, which means they may need to reach out further to the internet to the official locations to download files at runtime.
Alacritty Windows
Fortunately, distribution rights do not apply for internal use. With any edition of Chocolatey (including the free open source edition), you can host your own packages and cache or internalize existing community packages.
Disclaimer
Install Alacritty Mac
Your use of the packages on this site means you understand they are not supported or guaranteed in any way. Learn more...