My journey into Arch and Hyprland
Published on Feb 15, 2025 by math-almeida.
A few weeks ago, I was using KDE Manjaro when I came across a post on X about Arch Linux and Hyprland that caught my attention. The post featured a video (which I couldn’t find again for reference) showcasing a specific configuration, and I was absolutely amazed by how clean and beautiful the system looked. At that moment, I decided to build my own configuration using Arch and Hyprland.
This journey was divided into several small chapters:
Writing and Customizing Hyprland Configuration
I began by writing my configuration before actually using it. This approach gave me more control over what I was doing and what I could do next without breaking the system. I explored various dotfiles as examples, testing different solutions to determine what I wanted for my setup. Some of the most helpful dotfiles I referenced were:
These resources gave me a great understanding of how to organize my configuration. A special thanks to Outragedline, who became a friend and supported me throughout this process. After researching the necessary packages, I compiled a collection to use:
- Kitty: A free and open source GPU accelerated terminal emulator written in C and Python.
- Bottom: A customizable terminal-based system monitor inspired by htop, written in Rust.
- Rofi: A window switcher and application launcher for creating menus, written in C.
- Swaylock: A screen locker for Wayland, written in C.
- Waybar: A customizable Wayland bar, written in C++.
- Yazi: A amazing terminal file manager, written in Rust.
This part of the setup was tedious because it involved writing and testing configurations. Rather than explaining every detail, I’ll just share my configuration as a reference.
Create script for automatize instalation and future uses
Since the beginning of my dotfiles project, I created a Makefile and several helper scripts to simplify system installation. The same approach applied to my desktop configuration. First, I created a packages.yaml file listing all the packages to install. This allows modifications in one place while reflecting changes across different installation steps. However, I faced a challenge: how to read YAML keys without adding heavy dependencies or complicated logic? My solution was to use yq to process the file and format the arguments for pacman or yay:
@yq '.yay.hypr' packages.yaml | tr -d '[],"' | xargs yay -S --noconfirm
After installing the packages, I needed to symlink my latest configurations to the correct locations. For this, I used a symlink script written in Ruby (thanks to vinibispo) to automate the process:
cp symlinks.rb Desktop && cd Desktop && ruby symlinks.rb && rm symlinks.rb
Installing Arch
First, I downloaded the ISO file from the Arch Linux website. Since I live in Brazil, I used the Unicamp mirror. To create a bootable USB drive, I prepared it using Ventoy (thanks, Rick!). This fantastic open-source tool allows storing multiple ISO files while keeping the USB functional for regular file storage.
Connecting to Wi-Fi in Arch Live Environment
After booting into the Arch ISO, I used iwctl
(iNet Wireless Daemon) to connect to Wi-Fi:
1 - Identify the network device:
ip addr show
Mine is wlan0
2 - List available Wi-Fi networks:
iwctl station wlan0 get-networks
3 - Connect to the network:
iwctl --passphrase "your-passphrase" station wlan0 connect your-wifi-network
To verify the connection, run ip addr show
again.
Running the Arch Installer
I then used the archinstall
script, which provides an easy interface for installation. For a minimal setup, I selected:
{ "additional-repositories": ["multilib"], "archinstall-language": "English", "audio_config": {"audio": "pipewire"}, "bootloader": "Systemd-boot", "disk_config": { "config_type": "default_layout", "device_modifications": [{ "device": "/dev/nvme0n1", "partitions": [ {"fs_type": "fat32", "mountpoint": "/boot", "flags": ["boot", "esp"]}, {"fs_type": "ext4", "mountpoint": "/"} ], "wipe": true }] }, "hostname": "archlinux", "kernels": ["linux"], "locale_config": {"kb_layout": "us", "sys_lang": "en_US"}, "mirror_config": {"mirror_regions": {"Brazil": [ "http://mirrors.ic.unicamp.br/archlinux/$repo/os/$arch" ]}}, "timezone": "America/Sao_Paulo" }
After completing the installation, I rebooted:
reboot
Upon reboot, the system prompted me for my login credentials. Once logged into the minimal Arch environment, I proceeded with my personal configuration setup.
Finalizing the Setup
First, I connected to Wi-Fi using nmcli
:
nmcli device wifi connect your-wifi-network password your-password
Then, I installed git
with:
sudo pacman -S git --noconfirm
Next, I cloned my dotfiles repository:
git clone https://github.com/math-almeida/dotfiles.git
Inside the repository, I ran my Makefile script:
cd dotfiles
make build
This script installed and configured the rest of my system. Finally, I started Hyprland:
hyprland
And that’s it! My Arch Linux + Hyprland setup was complete!