Daily Use: Updates, Themes, Apps, and Screen Tools

This section covers how to keep Omarchy and your Arch Linux system up to date using the omarchy-update command. It explains each step in the update process, its purpose, and how it interacts with other components.

Index


Updating Omarchy and Your System

Perform daily updates to pull the latest Omarchy scripts, run migrations, upgrade packages, and restart services when needed.

Overview

The omarchy-update command orchestrates:

  • Pulling upstream changes.
  • Applying schema or configuration migrations.
  • Updating system and AUR packages.
  • Prompting for reboots or service restarts.

This ensures your desktop remains stable and up to date.

omarchy-update Command

The primary update entrypoint is the omarchy-update script:

#!/bin/bash
set -e
omarchy-snapshot create || [ $? -eq 127 ]
omarchy-update-git
omarchy-migrate
omarchy-update-system-pkgs
omarchy-update-restart
omarchy-restart-waybar  # removes update-available icon
  • set -e: Exit on first error.
  • omarchy-snapshot create: Optionally creates a system snapshot (ignored if Snapper is unavailable).
  • Subcommands: Sequence of Git update, migrations, package upgrades, and restarts.

Subcommands Breakdown

Subcommand Purpose
omarchy-snapshot create Create Snapper snapshots for all configured Btrfs volumes.
omarchy-update-git Pull latest Omarchy changes; clean up merge conflicts if any.
omarchy-migrate Execute any pending migrations under ~/.local/share/omarchy/migrations/.
omarchy-update-system-pkgs Run pacman -Syu and optionally yay -Sua to update official and AUR packages.
omarchy-update-restart Detect kernel or service updates; prompt for reboot or component relaunch.
omarchy-restart-waybar Restart Waybar to clear the “update available” indicator.

omarchy-update-git

Updates the local Omarchy repository:

#!/bin/bash
echo -e "\e[32mUpdate Omarchy\e[0m"
git -C $OMARCHY_PATH pull --autostash
git -C $OMARCHY_PATH diff --check || git -C $OMARCHY_PATH reset --merge
  • --autostash: Preserve local changes.
  • Diff check: If conflicts exist, reset to merge state.

omarchy-migrate

Runs schema/config migrations exactly once:

#!/bin/bash
STATE_DIR="$HOME/.local/state/omarchy/migrations"
mkdir -p "$STATE_DIR" "$STATE_DIR/skipped"

for file in ~/.local/share/omarchy/migrations/*.sh; do
  filename=$(basename "$file")
  if [[ ! -f "$STATE_DIR/$filename" && ! -f "$STATE_DIR/skipped/$filename" ]]; then
    echo -e "\e[32m\nRunning migration (${filename%.sh})\e[0m"
    if bash $file; then
      touch "$STATE_DIR/$filename"
    else
      if gum confirm "Migration ${filename%.sh} failed. Skip and continue?"; then
        touch "$STATE_DIR/skipped/$filename"
      else
        exit 1
      fi
    fi
  fi
done
  • Tracks completed and skipped migrations in state files.

omarchy-update-system-pkgs

Upgrades official and AUR packages:

#!/bin/bash
ignored_packages=$(omarchy-pkg-ignored)
echo -e "\e[32m\nUpdate system packages\e[0m"
sudo pacman -Syu --noconfirm --ignore "$ignored_packages"

if pacman -Qem &>/dev/null; then
  if omarchy-pkg-aur-accessible; then
    echo -e "\e[32m\nUpdate AUR packages\e[0m"
    yay -Sua --noconfirm --ignore "$ignored_packages"
  else
    echo -e "\e[31m\nAUR is unavailable (skipping)\e[0m"
  fi
fi

# Remove orphaned packages
orphans=$(pacman -Qtdq)
if [[ -n $orphans ]]; then
  echo -e "\e[32m\nRemoving orphan packages\e[0m"
  sudo pacman -Rs --noconfirm $orphans
fi
  • Ignores pinned or blacklisted packages.
  • Automatic cleanup of unneeded dependencies.

omarchy-update-restart

Checks for system updates requiring user action:

#!/bin/bash
# Kernel version mismatch → reboot
if [ "$(uname -r | sed 's/-arch/\.arch/')" \
     != "$(pacman -Q linux | awk '{print $2}')" ]; then
  gum confirm "Linux kernel updated. Reboot?" && sudo reboot now

# Pending reboot marker
elif [ -f "$HOME/.local/state/omarchy/reboot-required" ]; then
  gum confirm "Updates require reboot. Ready?" && sudo reboot now

# Hyprland relaunch marker
elif [ -f "$HOME/.local/state/omarchy/relaunch-required" ]; then
  gum confirm "Updates require Hyprland relaunch. Ready?" && uwsm stop
fi

# Restart specific services (e.g., Waybar, Walker)
for file in "$HOME/.local/state/omarchy/restart-*-required"; do
  service=$(basename "$file" | sed 's/restart-\(.*\)-required/\1/')
  echo "Restarting $service"
  omarchy-state clear "$(basename "$file")"
  omarchy-restart-"$service"
done
  • Prompts user for reboot or component reload.

Update Workflow Diagram

flowchart TD
  A[User runs omarchy-update] --> B[omarchy-snapshot create]
  B --> C[omarchy-update-git]
  C --> D[omarchy-migrate]
  D --> E[omarchy-update-system-pkgs]
  E --> F[omarchy-update-restart]
  F --> G[omarchy-restart-waybar]
  style A fill:#f9f,stroke:#333,stroke-width:2px

This flowchart visualizes each step in the update sequence and their dependencies.


State & Snapshots

  • Migrations State: Tracked in ~/.local/state/omarchy/migrations/.
  • Restart/Reboot Markers: Placed in ~/.local/state/omarchy/restart-*.required.
  • Snapshots: Managed via omarchy-snapshot using Snapper (if available) to ensure system restore points.

By following this update process, you ensure your Omarchy-driven Hyprland desktop remains consistent, secure, and aligned with upstream improvements.