How to Install Arch Linux and Hyprland (Part 2 of 2)
16/11/2024
This is the second half of a guide I've written on installing Arch Linux and Hyprland. You can read the first part here which will guide you through setting up an incredibly minimal Arch Linux install.
Hyprland is considerably easier to install and get running especially if you're not writing your dotfiles from scratch. At the end of this guide you will have a fairly simple Hyprland install on top of Arch.
Assumptions and Prerequisites
- This guide will show you how to replicate my setup on your installation. Everyone is unique (yaaay) so your needs and idiosyncrasies may be different to mine and you may disagree with some of the choices in the config. I recommend using this article not as instructions, but as a reference to copy parts of to ultimately build your own unique setup.
- As with the previous guide, although there is much less technical knowledge to be gained from installing Hyprland, I will be putting small explanations and comments in italics.
Stage 1/3: Initial Setup
First sync pacman so it has the most recent repositories.
1
sudo pacman -SyyAUR Helper (Yay)
The Arch User Repository or AUR is a community-driven repository containing packages not officially supported by Arch Linux. Many packages such as Visual Studio Code, Spotify or VMware will be found here.
Packages on the AUR work by user-created PKGBUILDs that describe to the Arch Build System how to compile a package. This compiled package can then be installed using pacman. While it can be useful to know how to build packages manually, I found it quickly gets tedious and an AUR helper makes things much nicer by automating the process.
Certain packages we'll need can only be found in the AUR, so we'll need to set up a helper. In this case we'll use yay since I'm more familiar with it.
Since we don't have a helper yet, we'll need to build yay manually, however that's incredibly easy.
1
2
3
git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -siYou'll be asked to install Golang as a dependency.
You can now use yay to install any AUR package needed in the future.
Installing Packages
Before we install Hyprland, we must first install packages needed for a functional environment.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
sudo pacman -S firefox alacritty thunar pipewire wireplumber pipewire-audio pipewire-pulse dunst xdg-desktop-portal-hyprland hyprpolkitagent hyprpaper hyprlock hypridle qt5-wayland qt6-wayland waybar rofi feh kvantum qt5ct qt6ct nwg-look bluez bluez-utils blueman sof-firmware wl-clipboard ly
# Explanation of packages
firefox: Web browser
alacritty: Terminal
thunar: GUI File Manager
pipewire: Sound server for getting... sound
wireplumber (needed): Session and policy manager for pipewire
pipewire-audio: Audio support for pipewire
pipewire-pulse: Pipewire replacement for pulseaudio (common sound server on Linux)
dunst: Daemon used for displaying notifications such as Discord messages or Spotify song changes
xdg-desktop-portal-hyprland: Implementation of an xdg-desktop-portal for Hyprland. Explanation of portals can be found at https://wiki.archlinux.org/title/XDG_Desktop_Portal
hyprpolkitagent: Polkit authentication daemon. Needed for GUI apps to request elevated permissions.
hyprpaper: Used for setting and changing wallpapers in Hyprland
hyprlock: Screen locker for Hyprland
hypridle: Run scripts when your device goes idle. This can be ignored if you don't want your device to sleep such as a desktop
qt5-wayland and qt6-wayland: Libraries for QT applications to work under wayland. QT is a framework for building GUI apps in C++.
waybar: Menubar for Wayland systems.
rofi: Application launcher
feh: Simple image viewer
kvantum: Used for more granular configuration of QT apps.
qt5ct and qt6ct: Used for theming QT5 and QT6 apps
nwg-look: Used for theming Gnome apps
bluez and bluez-utils: Bluetooth support
blueman: GUI for connecting to Bluetooth devices
sof-firmware: Some **laptops** may need this for their speakers to work
wl-clipboard: Clipboard manager for Wayland
ly: Minimal display manager. We'll use this to provide the UI login.You may be prompted on certain versions of packages to install. The default options will work just fine.
Since we installed ly, our login manager, we'll need to enable it using systemd. Ly needs to be enabled on a per-TTY basis.
The default TTY for graphical logins is TTY1 so we'll enable it for that.
1
sudo systemctl enable [email protected]If you installed bluez and bluez-utils you should enable bluetooth as well.
1
sudo systemctl enable bluetoothNext there are a few packages we'll need to install from the AUR. We'll use our newly installed yay AUR helper to do just that.
1
2
3
4
5
6
7
yay -S grimblast-git visual-studio-code-bin spotify downgrade
# Explanation of Packages
grimblast-git: Tool used for screenshots on Hyprland
visual-studio-code-bin: VSCode, because if you're following this guide you're probably a programmer like me.
spotify: Music player I'm in an abusive relationship with. Trying to find a replacement at the moment.
downgrade: Tool for easily downgrading packages on Arch Linux. Very useful for reverting breaking updates on certain packages.When using yay you'll be prompted with 'packages to cleanbuild' and 'diffs to show'. These refer to building without cache and viewing differences between the previous PKGBUILD and the latest. You can just answer N to both of them.
Stage 2/3: Installing Hyprland
Next we'll actually install Hyprland. We'll also install xorg since it will provide us with xwayland which is needed so X11 apps can work under wayland.
1
sudo pacman -S hyprland xorgTry out Hyprland using the Hyprland command.
1
HyprlandYou should see your Hyprland desktop for the first time.
Ignore the huge cursor.
Stage 3/3: Configuration
Right now we're using the auto-generated config for Hyprland. This means our apps won't really work.
Press SUPER M to exit Hyprland.
For this tutorial, we'll use my own config file as a base but if you already have an existing Hyprland config make sure to back it up.
1
cp -r ~/.config/hypr ~/.config/hypr.bakClone my dotfiles from Github:
1
2
3
4
5
6
git clone https://github.com/John-Ling/dotfiles
cd dotfiles/
cp -r hypr alacritty waybar rofi dunst code-flags.conf ~/.config/
cp -r .local/* ~/.local/
chmod +x ~/.local/bin/*.sh
cp .zshrc .vimrc ~/SwayOSD
Many operating systems have a built-in OSD or on-screen display to show visual feedback to changes in volume or brightness. As of writing, Hyprland does not offer such a feature; however, SwayOSD is a solid alternative.
Install it using pacman:
1
sudo pacman -S swayosdAfterwards, we'll enable the systemd service to listen for keypresses that change the volume or brightness.
1
sudo systemctl enable --now swayosd-libinput-backend.serviceStyling is done via CSS file located at ~/.config/swayosd/style.css.
Icons
I'm fond of the uniform shape of the icons on MacOS so I use the Tela Circle icon theme. Installation is trivial.
1
2
3
git clone https://github.com/vinceliuice/Tela-circle-icon-theme.git
cd Tela-circle-icon-theme/
./install -n standardStarting Hyprland Back Up
Let's jump back into Hyprland by running the Hyprland command.
1
HyprlandOpen a terminal using the command CTRL SUPER T
My bindings use the windows key as the main mod key to trigger actions. While this may seem unwieldy, it is because I swap the position of ALT and SUPER via a keyboard remapper. To change the main modifier to ALT, you can edit the settings.conf file in the config's hypr folder.
Fixing Monitor Issues
You may notice that your screen is not at the correct resolution or that some text is blurry. This is likely because we haven't properly configured the monitors.
Hyprland offers a useful program called hyprctl. We'll use that to view our connected monitors. We'll combine this with another command, grep, to make the output a little more readable
1
hyprctl monitors | grep MonitorHere's what my setup would look like.

Remember the names of those monitors. In my case I'll make note of eDP-1 and HDMI-A-2.
We're going to adjust our settings file in the Hyprland config.
1
nano ~/.config/hypr/settings.confAdjust $monitorA and $monitorB to your correct monitor. If you have only 1 monitor you can set both variables to the same value.

If you found the use of the SUPER key to be uncomfortable, you can change the main modifier key as well in a similar way.
Save the file using CTRL O and exit with CTRL X and your desktop should scale correctly and display the correct resolution.
NVIDIA
See https://wiki.hyprland.org/Nvidia - it explains setting up NVIDIA far better than I could ever.
Theming
Next, we'll apply some themes for our applications to look right. We'll also configure the system to use our new Tela Circle icon theme rather than the standard Adwaita theme
GTK
For GTK, we'll use the Fluent dark theme. Clone the repository from Github
1
2
3
git clone https://github.com/vinceliuice/Fluent-gtk-theme.git
cd Fluent-gtk-theme
./install.shNext, we'll open nwg-look or "gtk settings". Open rofi using SUPER W and search for it.

In the settings page, select Fluent-dark as your widget theme and hit "apply".
Use the default font drop menu to set your font to Inter Variable Regular. I personally use font size 10 but you can choose whatever.

Next head to "Icon Theme" and select "standard". After that hit "apply".

QT
We've now themed our GTK applications including apps such as Firefox. However, we still need to set our QT theme for QT based applications.
Open Rofi again with SUPER W.
To theme our applications, we'll first open Kvantum Manager. Go to "Change/Delete Theme" and select KvGnomeDark. Click "use this theme". Then, we'll head over to Qt5 and Qt6 settings. For both settings select Kvantum as your style and hit apply.

Head to the fonts section. Just like in GTK Settings, we're going to select Inter Variable with a font size of 10 and a monospace font for the fixed-width.

Tweaks for Laptop Users
TLP
In my case I've found that using the TLP package has improved my battery life dramatically.
1
2
sudo pacman -S tlp
sudo systemctl enable --now tlpAll laptops tend to be different. A more recent (not really) Thinkpad T420 I've come into possession of seems to show little difference under TLP and I'm certain that there exist laptops whose battery life is worsened with TLP.
Power saving on Linux will always be a bit worse than Windows on the basis that Windows, for all its overhead, does have more sophisticated powersaving code.
Figuring out what works for you will just be a process of tweaking things and timing how long your battery life lasts. It's the process I'm doing right now with my T420.
Laptop Suspend Monitor Fix
A weird issue I've found on my laptop is that when plugged into a monitor, the system will not suspend if the lid is closed. I'd prefer if the attached monitor switched off when I close my laptop.
To do this we'll need to edit a file called logind.conf
1
sudo nano /etc/systemd/logind.confScroll to HandleLidSwitch, uncomment it by removing the # and set its value to "ignore".

My configuration file should trigger a script under ~/.local/bin called handle_lid.sh.
Edit this file and change HDMI-A-2 to the secondary monitor you set in your settings.conf. (i.e if your secondary monitor is VGA-1 then change to that). Change the resolution as well if needed.

Setting up ZSH
If you want to use ZSH rather than the built-in Bash, install ZSH using pacman.
We'll also change the default shell.
1
2
sudo pacman -S zsh
chsh -s $(which zsh)You'll have to log out and log back in for the changes to appear. Use CTRL SUPER DELETE to bring up a powermenu.

I personally like to use extensions such as Oh-My-Zsh, Powerlevel10k and syntax highlighting. This step is optional however here are the guides to follow to get that set up.
- Powerlevel10k: https://github.com/romkatv/powerlevel10k
- Oh-My-ZSH: https://github.com/ohmyzsh/ohmyzsh
- Syntax Highlighting: https://github.com/zsh-users/zsh-syntax-highlighting
What Next
What this guide should give you is a pretty basic configuration for Hyprland. From there, you can start using your new environment or you could spend a little more time theming and ricing your system until everything's just right.
This guide barely scratches the surface of things to do with Hyprland and you'll likely need to further tweak things to flatten out quirks in your system.
If you ever get stuck, I recommend the Hyprland wiki or looking on places like Reddit. I'm not a Discord user so I cannot say whether Hyprland's server is a good place for help.
With Linux, you're really the one in control for better and for worse. Do whatever you want and have fun! You learn better that way.
Back