#!/usr/bin/env bash # Installs Unfold for Omarchy: downloads the latest package from GitHub releases and installs it # with pacman. Run it again to update. # # curl -fsSL https://unfoldplanner.com/install.sh | bash # # Remove Unfold with: sudo pacman -R unfold-omarchy set -euo pipefail package_url="https://github.com/nemira-labs/unfold-releases/releases/latest/download/unfold-omarchy-x86_64.pkg.tar.zst" work="" fail() { echo "unfold: $*" >&2 exit 1 } # Everything runs from here, so a download cut off halfway runs nothing. main() { command -v pacman >/dev/null || fail "this installs a pacman package, for Omarchy on Arch Linux" [ "$(uname -m)" = x86_64 ] || fail "there's only an x86_64 package so far (this is $(uname -m))" work=$(mktemp -d) trap 'rm -rf "$work"' EXIT local package="$work/unfold-omarchy-x86_64.pkg.tar.zst" echo "downloading unfold for omarchy" curl -fL --progress-bar -o "$package" "$package_url" || fail "couldn't download $package_url" echo "installing it with pacman" if [ "$(id -u)" -eq 0 ]; then pacman -U --needed --noconfirm "$package" else sudo pacman -U --needed --noconfirm "$package" fi cat <<'EOF' unfold is installed. next, set up the keys, the bar module and the theme hook: unfold-omarchy-setup # shows what it would change unfold-omarchy-setup --apply then press super shift u to open unfold, and super shift t for quick entry. EOF } main "$@"