Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand, Chinese Proverb

Setting up a fresh Arch Linux installation requires transforming the minimal base system into a fully functional environment. This process often begins with installing an AUR (Arch User Repository) helper to access a wider range of software, followed by configuring essential system components.
The following guide provides two bash scripts to automate this workflow: first, installing Paru, a modern AUR helper written in Rust; and second, deploying a comprehensive base system setup. This setup covers critical dependencies like PipeWire for audio, Wayland utilities for clipboard and screenshot management, essential fonts, and common CLI tools, ensuring a robust foundation for your desktop environment.
The AUR is a community-driven repository for Arch Linux users. Unlike the official repositories, the AUR doesn’t contain pre-compiled binaries —it contains PKGBUILD scripts that download source code and compile it on your machine.
#!/usr/bin/env bash
# ── 00-aur-helper.sh ──────────────────────────────────────────────────────────
# Install paru — a fast AUR helper written in Rust.
# Must run as a REGULAR USER (not root) — makepkg refuses to run as root.
#
# Why paru over yay:
# paru is actively maintained, written in Rust (fast), supports PKGBUILD
# review, and handles split packages and AUR dependencies reliably.
#
# Run: bash 00-aur-helper.sh
# ─────────────────────────────────────────────────────────────────────────────
set -euo pipefail # Exit on error, catches typos and missing variables, or pipe failure
# Prevents continuing after errors
# ── Guards ────────────────────────────────────────────────────────────────────
# Root Guard
if [[ "$EUID" -eq 0 ]]; then
echo "❌ Do not run as root. Run as your regular user." >&2
exit 1
fi
if command -v paru &>/dev/null; then
# Returns 0 if paru exists, non-zero otherwise
# &>/dev/null: Redirects both stdout and stderr to /dev/null (silences output)
echo "✅ paru is already installed: $(paru --version)"
exit 0
fi
# ── Dependencies: git and base-devel must exist first ─────────────────────────
# base-devel provides make, gcc, binutils etc. required by makepkg.
echo "── Installing build dependencies..."
sudo pacman -S --needed --noconfirm git base-devel
# ── Clone and build paru from AUR ─────────────────────────────────────────────
# We clone to /tmp so it does not pollute the home directory.
TMPDIR=$(mktemp -d)
echo "── Cloning paru into $TMPDIR..."
git clone --depth 1 https://aur.archlinux.org/paru.git "$TMPDIR/paru"
pushd "$TMPDIR/paru" > /dev/null
# pushd changes directory AND pushes old location onto stack
# popd returns to previous directory
# makepkg -si:
# -s install missing dependencies via pacman
# -i install the package after building
# --noconfirm Auto-answer yes to prompts
echo "── Building and installing paru (this takes ~1-2 min)..."
makepkg -si --noconfirm
popd > /dev/null
# ── Cleanup ───────────────────────────────────────────────────────────────────
rm -rf "$TMPDIR"
echo "✅ paru installed: $(paru --version)"
echo " Next: bash 01-base.sh"
echo "┌─────────────────────────────────────────────────────────────┐"
echo "│ paru is ready to use! │"
echo "└─────────────────────────────────────────────────────────────┘"
echo ""
echo "📦 Basic Usage:"
echo " paru -Syu # Update system (official + AUR packages)"
echo " paru -S # Install package (from official repos or AUR)"
echo " paru -Ss # Search for packages"
echo " paru -Qm # List installed AUR packages"
echo " paru -G # Download PKGBUILD for inspection"
echo ""
echo "⚙️ Configuration:"
echo " ${config_file}"
echo ""
echo "📖 More Information:"
echo " man paru"
echo " paru --help"
echo ""
echo "📝 Log file saved to: ${LOG_FILE}"
echo ""
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo -e "${GREEN}✅ Next step: Run bash 01-base.sh to install base packages${NC}"
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
#!/usr/bin/env bash
# ── 01-base.sh ────────────────────────────────────────────────────────────────
# Base packages needed before Niri and Noctalia.
# Covers: audio (pipewire), fonts, clipboard, screenshots, notifications,
# networking UI, file manager, terminal, and common CLI tools.
#
# Run: bash 01-base.sh
# ─────────────────────────────────────────────────────────────────────────────
set -euo pipefail
echo "── 01-base: installing base packages..."
# ── Audio: PipeWire stack ─────────────────────────────────────────────────────
# PipeWire is the modern audio/video server replacing PulseAudio and JACK.
# wireplumber is the session manager that routes streams between apps and devices.
# pipewire-alsa / pipewire-pulse ALSA and PulseAudio compatibility
# pipewire-jack: JACK compatibility
AUDIO=(
pipewire
pipewire-alsa
pipewire-pulse
pipewire-jack
wireplumber
pavucontrol # GTK volume control GUI
)
# ── Wayland utilities ─────────────────────────────────────────────────────────
WAYLAND=(
wl-clipboard # wl-copy / wl-paste — clipboard CLI for Wayland
grim # screenshot tool for Wayland, grim screenshot.png (full screen)
slurp # interactive region selector used with grim, grim -g "$(slurp)" selection.png
cliphist # clipboard history daemon (integrates with Noctalia)
xdg-desktop-portal-gtk # portal backend for file pickers and screenshots
xdg-user-dirs # creates ~/Downloads, ~/Pictures etc.
)
# Clipboard Management
# Copy to clipboard
echo "Hello" | wl-copy
# Paste from clipboard
wl-paste
# Clipboard history with cliphist
echo "text" | wl-copy
cliphist list # Show history
cliphist decode | wl-copy # Restore previous item
# ── Fonts ─────────────────────────────────────────────────────────────────────
# Noctalia's UI requires Material Symbols (installed from AUR below).
FONTS=(
ttf-jetbrains-mono-nerd # terminal font with Nerd Font icons
ttf-hack-nerd # your preferred terminal font
noto-fonts # Comprehensive Unicode
noto-fonts-emoji # Color emojis
noto-fonts-cjk # Chinese/Japanese/Korean
)
# ── Notifications ─────────────────────────────────────────────────────────────
NOTIFICATIONS=(
libnotify # provides notify-send CLI
)
# ── Apps ──────────────────────────────────────────────────────────────────────
APPS=(
alacritty # GPU-accelerated terminal
thunar # Lightweight file manager
firefox # Web browser
keepassxc # Password manager
mpv # Media player
imv # Lightweight image viewer for Wayland
ristretto # GUI image viewer (Xfce)
gimp # Image editor
evince # PDF viewer
)
# ── CLI tools ─────────────────────────────────────────────────────────────────
TOOLS=(
git
ripgrep # Fast recursive search, rg "pattern"
fd # User-friendly find, fd "\.rs$" is the same as find . -name "*.rs"
bat # Syntax-highlighted cat
eza # Modern ls replacement with icons, eza -la --icons
fzf # Fuzzy finder
btop # Resource monitor
neovim # Modern Vim
zsh
starship # Cross-shell prompt
stow # Symlink manager
)
# ── Network ───────────────────────────────────────────────────────────────────
NETWORK=(
networkmanager # Network connection manager
network-manager-applet # System tray icon, used by Noctalia's network widget
)
# ── Install official repo packages ────────────────────────────────────────────
sudo pacman -S --needed --noconfirm \
"${AUDIO[@]}" \
"${WAYLAND[@]}" \
"${FONTS[@]}" \
"${NOTIFICATIONS[@]}" \
"${APPS[@]}" \
"${TOOLS[@]}" \
"${NETWORK[@]}"
# ── AUR packages ──────────────────────────────────────────────────────────────
# ttf-material-symbols-variable-git: icon font required by Noctalia Shell
# google-chrome: Chrome browser (not in official repos, proprietary)
# localsend-bin: LAN file sharing — pre-built binary, faster than building from source.
paru -S --needed --noconfirm \
ttf-material-symbols-variable-git \
google-chrome \
localsend-bin
# ── Enable services ───────────────────────────────────────────────────────────
# NetworkManager handles wifi/ethernet — enable system-wide
sudo systemctl enable --now NetworkManager
# PipeWire runs as user services (not system-wide).
# The || true prevents set -e from aborting if already enabled/running.
systemctl --user enable --now pipewire pipewire-pulse wireplumber 2>/dev/null || true
# ── XDG user directories ──────────────────────────────────────────────────────
# Creates ~/Downloads, ~/Documents, ~/Pictures etc. based on locale
xdg-user-dirs-update
echo "✅ 01-base: done"
echo " Next: bash 02-niri.sh"