DEV Community

Pablo Beltran
Pablo Beltran

Posted on

My journey to "I use arch btw"

1. How this project started?

Me

I'm going to be honest, it's been ages since I have written something without the use of AI to fix my writing. English is not my first language so please bear with me!

With the rapid rise of AI, I felt that I have been losing passion for what I used to love at some point: learning. Nowadays, we can quickly solve most of our problems with the use of AI, often times, not even reviewing if it correct or not. That's why I decided to take some time daily to learn something new without or minimal use of AI.

The first step is deciding, what should I try to learn first? Well, it was quiet easy to find out what. If you are into Linux, you have probably heard of Omarchy at this point. Like it or not, there's no deny that it's getting more popular among developers. So, why not try to build a decent looking Arch workspace?

Before continuing, I would like to mention that this is not a guide. There are lot of resources online that teaches you how to install Archlinux and other packages.

2. Why Archlinux?

Archlinux logo

Archlinux has -or had- the reputation of being difficult to get started with. Most of us are used to booting into a nice-looking, functional operating system. Although I have some Linux knowledge, I wanted to have a better understanding of what it takes to have a decent workspace.

3. Installing Archlinux

The first step is actually installing Arch on my device. The device I'm going to use is my trusty built PC that I currently use exclusively for gaming. There are a few things to consider before jumping into installing Arch:

  • My PC has an Nvidia RTX 5050 and AMD Ryzen 5 CPU.
  • Need dual boot to switch between Windows 11 and Archlinux.
  • I don't want to change the BIOS options repeatively.

With this in mind, I quickly created a bootable USB using RUFUS.

3.1. Booting the USB

If you are a Windows 11 user and have dual boot, you may know that Windows requires Windows Secure Boot. In order to boot another operation system, you'll need to change your Secure Boot options.

The first time you launch Archlinux, you'll first notice there's no GUI. This can be intimidating at first for some users but thankfully, the Arch Wiki provides a clear and concise installation guide.

A few things that made the installation easier for me was having an extra SSD and Ethernet connection. If you are using WiFi, you'll probably need some extra configuration. Also, you can always create a new partition if you only have one storage device.

3.2. Nvidia & AMD drivers

In my case, my PC has an Nvidia GPU and Ryzen CPU. In order for things to work properly, I had to install some extra drivers. This can be easily achieve with the following command:

pacstrap -K /mnt amd-ucode nvidia-open nvidia-utils
Enter fullscreen mode Exit fullscreen mode

Afterwards, you can quickly check if the drivers were successfully installed by running:

nvidia-smi # you should see your GPU information
Enter fullscreen mode Exit fullscreen mode

Thankfully, everything worked for me in the first try!

Note: from now on I will use pacman instead of the pacstrap wrapper.

3.3. Installing a compositor

Installation was successful, now what? With only a terminal as interface, some tasks such as using a browser are impossible -I think). In order to do these tasks, we need neither a Desktop Environment or a Compositor.

In my case, I decided to go with a compositor instead of desktop environment. I have already used others windows tilling managers such as i3wm. This time, I want something that has more features out-of-the-box.

While browsing through X, I found the Hyprland project account. This was exactly what I was looking for:

  • Window tilling manager.
  • Modern animations.
  • Out of the box configuration.

Hyprland default

The setup was quickly, you just have to install some basic packages and the dependencies will be installed too. We now have a way to interact with applications more visually.

3.4. Installing missing packages

Once I finish installing Hyprland, I moved on to installing missing packages for audio and software I normally use. For audio, I'm using pipewire.

sudo pacman -S pipewire pipewire-audio pipewire-pulse wireplumber
Enter fullscreen mode Exit fullscreen mode

I also installed other packages that will go nicely with Hyprland.

sudo pacman -S \
    alacritty \       #Terminal
    waybar \          #Control bar
    wofi \            #App launcher
    mako \            #Notifications
    thunar \          #File manager
    pavucontrol \     #Graphical mixer
    wl-clipboard \    #Copy-paste data
    grim \            #Screenshots
    slurp \           #Selection screenshots
    hyprpaper \       #Wallpapers
    hyprlock \        #Lock screen
    hypridle          #Idle utils
Enter fullscreen mode Exit fullscreen mode

4. Personalizing Hyprland

Time to start customizing Hyprland. Personally, this was the step I enjoyed the most. Like I mentioned before, Hyprland provides an out-of-the-box configuration. You can access the configuration file using your installed text editor. For example:

nvim ~/.config/hypr/hyprland.lua    # open with neovim
Enter fullscreen mode Exit fullscreen mode

The configuration file is written in Lua. I haven't tried Lua before but I can guarantee you is a pretty straightforward programming language. If it is also your first time programming in Lua, I highly recommend you watching the following video video, it is half an hour.

I will not include all the configuration files on this blog. You can check the repository for all the different configuration files.

4.1. Lua config files

The default configuration file is a bit painful to work on in my opinion. I decided to split the configuration file into several smaller modules, each representing a different module.

cd ~/.config/hypr
mkdir config
touch animations.lua \ #Window animations
      appearance.lua \ #Define your theme here
      autostart.lua  \ #What happens on start
      input.lua      \ #Configure your input keyboard
      keybinds.lua   \ #Add the key binds that you like the most
      monitors.lua   \ #Set your monitor information
      rules.lua        #Rules for other packages
Enter fullscreen mode Exit fullscreen mode

Note: Keep in mind that this is my initial configuration. It may change over time depending on my needs.

4.2. Packages config files

If you are into Linux, you most likely have heard the term "ricing". If not, ricing is basically turning your OS into a "Pimp my Ride" homage.

Other of the reasons why I choose to install Arch is it's personalization. The packages I have installed so far can be mostly customized by creating their respective directories and configuration files on ~/.config.

Once everything was done, I just had to reboot my system and hooray! I now have a decent looking Archlinux desktop. With more time and dedication you can results like these.

Desktop

As I'm versioning all the changes, I wanted a way to quickly clone the repository and apply the changes. For this, I created a script that will automatically update the files. You can run the script with:

sudo ./apply_changes.sh
Enter fullscreen mode Exit fullscreen mode

Note: I suck at shell, sometimes it crashes.

5. Can Linux and Windows coexist?

I haven't mentioned this before but this project took me a week to reach up until this point. During this time, I wanted to play some games with friends, this required to switch the Secure Boot option often in the BIOS - which became annoying quickly.

This was definitely the part I dislike the most. Took some time to figure out the solution on how to properly have dual boot of Windows 11 and Archlinux using grub.

The process required to install sbctl to create and enroll the keys. After some time, it finally worked. I'll probably create a guide for this as I'm sure I'm going to need it on the future.

# A snippet of the commands I ran
sudo pacman -S sbctl

sudo sbctl status
sudo sbctl create-keys
sudo sbctl enroll-keys -m

findmnt /boot

sudo grub-mkconfig -o /boot/grub/grub.cfg
Enter fullscreen mode Exit fullscreen mode

If you are having troubles with this, I recommend this guide.

6. What if the real "i use arch btw" was the friends we made along the way?

I started this project as a way ignite again the passion for learning and sure it did. Artificial Intelligence, in my opinion, is one of the greatest milestones of humanity. I just think, we, the everyday people, are abusing it's use and it's taking a toll.

Learning how to install Archlinux and configure Hyprland has been a blast. It's been some time since I genuinely was looking forward the next day to keep implementing new features. Not only that, I think I found a hobby in writing, it was super fun and will definitely continue writing more.

I hope you, the reader, enjoyed this small article as much as I enjoyed writing it.

Thank you for your time.

7. Repository & contribution

You can check the repository on Github. Please, feel free to contribute to the repository!

Note: this is an on-going project so it will most likely change over time.

Top comments (0)