Customization

Now that you have a new Arch Linux system, we will now start performing customizations in it.

Setting Up Paru and Pacman (again)

Installing An AUR Helper

Install Paru. This is the AUR helper that we will use.

# Install the latest stable version of Rust
sudo pacman -S --needed rustup
rustup toolchain install stable
 
# Clone the repo in a temp directory.
export PARU_TMP_DIR=$(mktemp -d)
git clone https://aur.archlinux.org/paru.git "${PARU_TMP_DIR}/paru"
 
# build and install paru.
cd "${PARU_TMP_DIR}/paru"
makepkg -si
 
# Go back home and remove the created temp directory.
cd ~
rm -rf $PARU_TMP_DIR
unset $PARU_TMP_DIR

Hooks and Helpers

Since we have Paru now, we can configure Pacman more now. Hooks are scripts that are executed automatically at certain points during the package management process. Create the /etc/pacman.d/hooks directory by running the following command:

sudo mkdir -p /etc/pacman.d/hooks

In the newly-created directory, create a new file named orphans.hook and paste the following:

[Trigger]
Operation = Install
Operation = Upgrade
Operation = Remove
Type = Package
Target = *
 
[Action]
Description = Searching for orphaned packages...
When = PostTransaction
Exec = /usr/bin/bash -c "/usr/bin/pacman -Qtd || /usr/bin/echo '==> no orphans found.'"

informant makes sure that you are aware of breaking changes in the updates that you’ll get. overdue lists daemons that reference outdated libraries. pacman-cleanup-hook keeps your pacman cache clean. rebuild-detector detects which Arch Linux packages need to be rebuilt. downgrade, while isn’t a pacman hook, will still help you in case you have to downgrade a package.

paru -S informant
sudo usermod -aG informant "$(whoami)"
informant read
 
paru -S overdue pacman-cleanup-hook rebuild-detector downgrade

Downloading the Dotfiles

Clone the Chris1320/SetupGuides-dotfiles and Chris1320/SetupGuides-ArchLinux repositories.

mkdir ~/Temp
 
git clone https://github.com/Chris1320/SetupGuides-dotfiles.git ~/Temp/SGDotfiles
git clone https://github.com/Chris1320/SetupGuides-ArchLinux.git ~/Temp/ArchLinuxDotfiles
 
cd ~/Temp/ArchLinuxDotfiles
 
# Initialize and pull submodules from remote
git submodule update --init --recursive
git lfs install       # Install LFS hooks
git lfs pull          # Download LFS files

Installing Essential Packages

Install these packages to ensure that the system will work properly.

paru -S acpid avahi dkms net-tools
systemctl enable \
    acpid.service \
    avahi-daemon.service \
    systemd-timesyncd.service

If you have an SSD, enable TRIM:

systemctl enable fstrim.timer

Audio and Video

PipeWire is now superseding PulseAudio when it comes to handling audio and video streams on Linux systems. We are going to install it on our system.

paru -S pipewire pipewire-audio pipewire-pulse lib32-pipewire \
	alsa-utils pipewire-jack wireplumber \
	gst-libav gst-plugins-base \
	gst-plugins-{good,bad,ugly} gstreamer-vaapi \
	ffmpeg easyeffects playerctl \
	x265 x264 lame

Regarding PipeWire and the whole setup

The dotfiles are configured to manipulate audio and video via PipeWire as well. It is not recommended to not use PipeWire, because you will have to change a lot of scripts.

Read more at Arch Linux Wiki > PipeWire.

Bluetooth Support

paru -S bluez bluez-utils blueman
systemctl enable bluetooth.service
systemctl start bluetooth.service

I also install required Bluetooth drivers in this part, if necessary. For example, my laptop has Broadcom devices, so I also install broadcom-bt-firmware from the AUR via paru.

Printer Support

These are needed to enable printing in our machine.

paru -S system-config-printer sane \
    foomatic-db foomatic-db-engine \
    gutenprint gsfonts \
    cups cups-pdf cups-filters
systemctl enable cups.service saned.socket

Development Tools

I use my machine for software development so I install compilers and interpreters on my system.

# Install development tools
paru -S \
    gcc go nvm \
    dotnet-sdk jdk-openjdk \
    php composer \
    python python-pip python-uv \
    android-tools android-udev
 
# Add user to adbusers group so that you can actually use it
sudo usermod -aG adbusers "$(whoami)"
 
# Install latest version of NodeJS and NPM via NVM
source /usr/share/nvm/init-nvm.sh
nvm install node
 
# Install Jupyterlab as a uv tool
uv tool install jupyterlab
 
# Other useful stuff
uv tool install howdoi
uv tool install magika

Flatpak Support

I use many Flatpak applications, so installing it is a must for me.

paru -S flatpak

Containers Support

I use Podman instead of Docker to manage and use containers.

paru -S podman podman-compose podman-docker

Must-Have Programs

These are packages that I always keep in my machine installed. Some of these packages, such as btop, socat, and jq are also required by the customization steps below.

paru -S tar unzip unrar p7zip zip xz cpio rclone trash-cli \
    dmg2img nfs-utils cifs-utils ntfs-3g exfat-utils gvfs \
    udisks2 pfetch btop socat jq inxi yt-dlp tealdeer wget
 
cp -r ~/Temp/SGDotfiles/btop ~/.config

Installing The Bare Minimum

Setting Up The Desktop

Hyprland will be our tiling compositor. I chose this over other DEs/WMs because it is easy to configure, has beautiful animations, and I really like its dynamic tiling. To start, install Hyprland and the components that make up the desktop by running the following command:

paru -S hyprland hyprpaper \
	hyprlock hypridle \
	hyprsunset hyprpicker \
	xdg-desktop-portal-gtk \
	xdg-desktop-portal-hyprland \
	qt5-wayland qt6-wayland \
	brightnessctl \
	grim slurp swappy \
	wf-recorder \
	polkit-gnome gnome-keyring \
	seahorse libsecret \
	nm-connection-editor \
	network-manager-applet \
	wl-clipboard cliphist \
	rofi-wayland rofimoji \
	pavucontrol waybar \
	dunst libnotify \
	batsignal kitty \
	ttf-jetbrains-mono-nerd ttf-noto-nerd noto-fonts-cjk \
	ttf-opensans noto-fonts otf-apple-fonts ttf-ms-win11-auto \
	papirus-icon-theme papirus-folders-catppuccin-git \
	otf-font-awesome ttf-material-icons-git \
	catppuccin-cursors-mocha

Additionally, this command also installs the following fonts and icons since we are going to use them:

  • Primary Fonts: ttf-jetbrains-mono-nerd ttf-noto-nerd noto-fonts-cjk ttf-opensans noto-fonts otf-apple-fonts ttf-ms-win11-auto
  • Primary Icons: papirus-icon-theme papirus-folders-catppuccin-git
  • Icon Fonts: otf-font-awesome ttf-material-icons-git
  • Cursor Icons: catppuccin-cursors-mocha

If you ever need help, Hyprland has their own wiki, so read it!

To start customizing Hyprland, just copy the necessary dotfiles to ~/.config/ and start required services. Running Hyprland at this time is not yet recommended since we haven’t customized the rest of the programs yet.

mkdir -p ~/.config/dunst
mkdir -p ~/.config/kitty
 
cp ~/Temp/ArchLinuxDotfiles/dotfiles/dunst/dunstrc ~/.config/dunst
cp ~/Temp/SGDotfiles/kitty/kitty.conf ~/.config/kitty
 
cp -r ~/Temp/ArchLinuxDotfiles/dotfiles/waybar ~/.config
cp -r ~/Temp/ArchLinuxDotfiles/dotfiles/hypr ~/.config
cp -r ~/Temp/ArchLinuxDotfiles/dotfiles/rofi ~/.config
cp -r ~/Temp/ArchLinuxDotfiles/batsignal ~/.config
cp -r ~/Temp/ArchLinuxDotfiles/scripts ~/.config
 
kitty +kitten themes --reload-in=all Catppuccin-Mocha
systemctl --user enable batsignal.service

Also copy your desired background image to ~/.config/background.

cp "~/Temp/ArchLinuxDotfiles/assets/wallpapers/<your desired wallpaper>" ~/.config/background
# I personally use `evening-sky.png` as my wallpaper.

Now, Hyprland’s configuration files are in place, but we still need to configure the rest of the system for it to function properly.

If you are having problems with Hyprland, see their wiki.

Setting Up The Display Manager

SDDM will be the display manager that our setup will use. It will be your “login screen”. Install and enable the SDDM service to start the display manager on boot.

paru -S sddm qt6-svg qt6-virtualkeyboard qt6-multimedia-ffmpeg
systemctl enable sddm.service

I use Keyitdev’s sddm-astronaut-theme as my SDDM theme.

sudo cp -r ~/Temp/ArchLinuxDotfiles/dotfiles/sddm/sddm-astronaut-theme /usr/share/sddm/themes
sudo mkdir -p /etc/sddm.conf.d
sudo cp -r ~/Temp/ArchLinuxDotfiles/dotfiles/sddm/sddm.conf /etc/sddm.conf.d/sddm.conf
printf '[General]\nInputMethod=qtvirtualkeyboard' | sudo tee /etc/sddm.conf.d/virtualkbd.conf
 
sudo mkdir -p /usr/share/wallpapers
sudo cp "~/Temp/ArchLinuxDotfiles/assets/wallpapers/<your desired wallpaper>" /usr/share/wallpapers/sddm-bg

Currently, I use 5am_Train_1920x1080.jpg as my SDDM background.

Edit the /usr/share/sddm/themes/sddm-astronaut-theme/Themes/theme1.conf file and change the following lines:

KeyValue
Background/usr/share/wallpapers/sddm-bg
FormPositionleft
HeaderTextYou can put anything here :>

Related Links:

Entering Hyprland

You have reached a checkpoint!

After installing the bare minimum requirements to run the setup, go ahead and type reboot to restart the system. You will be greeted by SDDM. Log in with your credentials and press SUPER+SHIFT+T to open a new terminal. You can now continue following the guide.

Setting Up ZSH

See ZSH for more information.

Neovim

Neovim is the best text editor and IDE on Linux btw (fight me). If I installed the packages from the Development Tools section, might as well use Neovim to write code. We’ll have to install some packages that are required by the plugins first.

paru -S neovim tree-sitter tree-sitter-cli
# Customize Neovim using my Neovim dotfiles
bash <(curl -sSf https://raw.githubusercontent.com/Chris1320/SetupGuides-Neovim/main/install)

Setting Up GPG and SSH

If you have an existing GPG and SSH keys, you can now start restoring them to your new system.

Using GNOME Keyring as Secrets Manager

Edit ~/.gnupg/gpg-agent.conf and insert the following line to use GNOME 3 pinentry when asking for GPG password:

pinentry-program /usr/bin/pinentry-gnome3

Run the following commands to use GNOME Keyring for SSH authentication.

systemctl enable --user gcr-ssh-agent.socket
systemctl start --user gcr-ssh-agent.socket

Importing Your GPG keys

First, import your GPG private key.

gpg --import your_gpg_key.gpg
 
chmod 700 ~/.gnupg
chmod 600 ~/.gnupg/*

Next, edit the key and trust it ultimately. You’ll have to get the key ID first.

# List secret keys and show their key IDs.
gpg --list-secret-keys --keyid-format=SHORT
# Edit the key
gpg --edit-key <THE KEY ID>
# gpg> trust
# ...
# Your decision? 5
# Do you really want to set this key to ultimate trust? (y/N) y
# gpg> quit

Importing Your SSH keys

Copy your private and public keys to ~/.ssh, and adjust the permissions.

# Create ~/.ssh if it does not exist.
mkdir -p ~/.ssh
 
# Copy the public and private keys to the newly-created directory.
# Example 1: ED25519 keys
cp ~/Downloads/your_ed25519_ssh_key ~/.ssh/id_ed25519
cp ~/Downloads/your_ed25519_ssh_key.pub ~/.ssh/id_ed25519.pub
# Example 2: RSA keys
cp ~/Downloads/your_rsa_ssh_key ~/.ssh/id_rsa
cp ~/Downloads/your_rsa_ssh_key.pub ~/.ssh/id_rsa.pub
 
# Adjust permissions
chmod 600 ~/.ssh/*
chmod 700 ~/.ssh

Configuring SSH

You can also add a host configuration block in ~/.ssh/config so that you can clone repositories using a shorter command.

Host gh
    HostName github.com
    User git
    IdentityFile ~/.ssh/id_ed25519

If you add this line, all you have to do when cloning GitHub repositories is to run git clone gh:username/repo.git. Make sure that you’ve set up your GitHub account correctly first.

You can test your setup by running the command

ssh -T gh

It should print out something like this:

Hi Chris1320! You've successfully authenticated, but GitHub does not provide shell access.

Setting Up Git

I always sign-off my git commits so I have commit.gpgsign set to true. I also have a couple aliases on hand for my most-used commands. Also, I use GitHub CLI to manage my GitHub repositories.

paru -S github-cli
 
cp -r ~/Temp/SGDotfiles/git/gitconfig ~/.gitconfig
nvim ~/.gitconfig  # Edit gitconfig to replace username, email, and signing key.
 
git config --global credential.helper /usr/lib/git-core/git-credential-libsecret

We haven’t set up any web browsers currently so we won’t run gh auth login for now.

Image and Video Viewers

I use Mpv and imv to view videos and images respectively.

paru -S imv mpv
cp -r ~/Temp/SGDotfiles/imv ~/.config

There two versions of the Mpv configuration file: one for high-end devices and the other for low-end machines. If your device can handle high CPU/GPU usage for better playback quality, copy the profile-high directory to ~/.config/mpv; otherwise, copy the profile-low directory.

cp -r ~/Temp/SGDotfiles/mpv/profile-high ~/.config/mpv  # For high-end devices
cp -r ~/Temp/SGDotfiles/mpv/profile-low ~/.config/mpv   # For low-end devices

With Mpv, I am using tomasklaen’s uosc config together with these plugins:

  • po5/evafast: Mpv script for hybrid fast-forward and seeking.
  • rofe33/mpv-copyStuff: Copy to clipboard the filename, full filename path, relative filename path, current video time, current displayed subtitle text, video duration/metadata.
  • po5/thumbfast: High-performance on-the-fly thumbnailer script for mpv.

The config also comes with the following shaders:

Music Player

Soon™️

Document Viewer

I use Zathura as my primary document viewer. To start, install it together with the necessary dependencies and copy the configuration file.

paru -S zathura zathura-cb zathura-djvu zathura-pdf-mupdf zathura-ps
cp -r ~/Temp/SGDotfiles/zathura ~/.config

For Microsoft Office documents, I use OnlyOffice.

paru -S onlyoffice-bin

Flatpak Manager

flatpak install flathub com.github.tchx84.Flatseal  # Install FlatSeal to manage Flatpaks

Theming GTK Applications

Currently, this setup uses the Everforest GTK theme. refi64/stylepak helps us automatically install our GTK+ theme as a Flatpak.

paru -S everforest-gtk-theme-git gtk-engine-murrine stylepak-git
 
# Install system and user themes to Flatpak
stylepak install-system
stylepak install-user

Using Hyprcursors

Hyprland introduced a new cursor theme format, called Hyprcursor. It is supposed to be a more efficient and faster cursor theme format. The Catppuccin cursors are already set up in Hyprland’s config file, so we just need to update gsettings with the appropriate settings.

Run the following script and select/enter your preferred cursor and cursor size (I use the defaults).

~/.config/scripts/set-cursor.sh

Input Methods

As of writing this, I am learning Japanese and Korean for 5 and 4 years, respectively. (I’m still not good at both btw) Because of this, I need Fcitx5 to allow me to use the Japanese and Korean input methods in Arch Linux.

paru -S fcitx5-im fcitx5-mozc-ut fcitx5-hangul

After installing the packages, run the following commands to create the configuration files with their corresponding contents:

printf 'gtk-im-module="fcitx"' > ~/.gtkrc-2.0
printf '[Settings]\ngtk-im-module=fcitx' > ~/.config/gtk-{3.0,4.0}/settings.ini

After that, run fcitx5-configtool and uncheck “Only Show Current Language”. Search for the following input methods and move them to the left “Current Input Method” column:

  • Mozc
  • Hangul

Go to “Global Options” tab and change the first entry of “Trigger Input Method” (should be initially set to Control+Space) to Super+, so that they won’t conflict with Hyprland’s keybindings.

More information is available at:

Setting Up The File Explorer

I chose Yazi as my GUI file explorer. I used to use Nautilus/GNOME Files, but I found Yazi to suit my needs.

paru -S yazi ouch archivemount mediainfo
cp -r ~/Temp/SGDotfiles/yazi ~/.config/yazi

I usually hide some of the XDG directories. Follow 3. Update XDG Directories to do this.

Setting Up The Browsers

paru -S firefox brave-bin torbrowser-launcher

Gaming on Arch

I don’t play many games on my laptop since I have my desktop computer. I get my games either from Steam or GOG, use MangoHud for performance monitoring, and Bottles for running Windows applications.

flatpak install flathub com.valvesoftware.Steam
flatpak install flathub com.usebottles.bottles
flatpak install flathub org.freedesktop.Platform.VulkanLayer.MangoHud
flatpak install flathub net.davidotek.pupgui2
paru -S gamemode lib32-gamemode
 
sudo usermod -aG gamemode "$(whoami)"
 
# Enable Steam Proton Integration
flatpak override --user com.usebottles.bottles --filesystem=~/.var/app/com.valvesoftware.Steam/data/Steam
# Grant all flatpak applications read-only access to MangoHUD config
flatpak override --user --filesystem=xdg-config/MangoHud:ro
# Enable MangoHUD on all Steam games
flatpak override --user --env=MANGOHUD=1 com.valvesoftware.Steam
 
cp -r ~/Temp/SGDotfiles/MangoHud ~/.config/MangoHud

Install Proton-GE. Set Steam Settings > Compatibility > Run other titles with to GE-Proton.

TIP

When you are going to play a game, enable mangohud and gamemode by adding the following to the launch options:

mangohud gamemoderun %command%

Screen Recording

paru -S obs-studio v4l2loopback-dkms v4l2loopback-utils

Btrfs Snapshots

We will use Snapper to create snapshots and Btrfs Assistant as the frontend. snap-pac is installed to create Btrfs snapshots before and after Pacman operations.

paru -S snapper snap-pac btrfs-assistant inotify-tools
 
# Temporarily unmount `/.snapshots` to let snapper create the config
sudo umount /.snapshots
sudo rm -r /.snapshots
sudo snapper -c root create-config /
sudo btrfs subvolume delete /.snapshots
sudo mount --mkdir -o noatime,compress-force=zstd:3,subvol=@snapshots /dev/sda4 /.snapshots  # use the same options you used from Manual Customization guide
cat /etc/fstab
 
systemctl enable snapper-boot.timer

To automatically update the GRUB menu with the latest snapper snapshots, run the following command to enable the needed service:

systemctl enable grub-btrfsd.service

Edit /etc/default/grub-btrfs/config. Uncomment/comment lines if needed.

KeyValue
GRUB_BTRFS_TITLE_FORMAT("date" "description" "snapshot" "type")

To boot snapshots using overlayfs, edit /etc/mkinitcpio.conf and add grub-btrfs-overlayfs to HOOKS:

HOOKS=(... grub-btrfs-overlayfs)

After saving and closing the file, run mkinitcpio -P.

Ricing Up GRUB

Our whole system mostly uses the Catppuccin colorscheme, so we’re going to use Catppuccin’s GRUB theme to rice our bootloader.

First, clone the catppuccin/grub repository and copy the themes to /usr/share/grub/themes.

git clone https://github.com/catppuccin/grub.git ~/Temp/grub && cd ~/Temp/grub
sudo cp -r src/* /usr/share/grub/themes/

Edit /etc/default/grub and edit the GRUB_THEME variable (uncomment if needed).

GRUB_THEME="/usr/share/grub/themes/catppuccin-mocha-grub-theme/theme.txt"

Save the file and update GRUB’s configuration by running:

sudo grub-mkconfig -o /boot/grub/grub.cfg

You can now remove the cloned repository.

cd ~ && rm -rf ~/Temp/grub

If you are having problems with theming GRUB, you can read the FAQs section in catppuccin/grub.

Final Touches

I use LocalSend to transfer any files between my devices within the local network and GNOME Text Editor because for some reason Neovim doesn’t work properly when set as the default text editor. GNOME Disk Utility is used as a GUI front-end for disk management stuff.

paru -S cava gedit gnome-disk-utility localsend-bin imhex-bin
 
cp -r ~/Temp/SGDotfiles/cava ~/.config/cava
 
# Ensure that GNOME Text Editor does not add newlines at the end of files
gsettings set org.gnome.gedit.preferences.editor ensure-trailing-newline false
 
# Authenticate GitHub CLI
gh auth login

Sometimes, there are things that I cannot do on Neovim, such as Live Share/Pair Programming with classmates on coding sessions. Because of this, I have to use Visual Studio Code. I use the Flatpak version because it’s what I use on my Fedora Workstation system.

flatpak install flathub com.visualstudio.code

Mod Discord and Spotify

flatpak install flathub com.discordapp.Discord
# Install Vencord (https://vencord.dev/)
# Run two times to install OpenAsar and Vencord
sh -c "$(curl -sS https://raw.githubusercontent.com/Vendicated/VencordInstaller/main/install.sh)"
flatpak install flathub com.spotify.Client
paru -S spicetify-cli

To set the default apps for common filetypes, run set-defaults.sh script from the ~/.config/scripts directory:

~/.config/scripts/set-defaults.sh