From 56f1c82b7d5573489d642a0c6a13890f7013a981 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Thu, 23 Oct 2025 11:31:29 -0700 Subject: [PATCH] Add omarchy-reinstall command to bring back screwed up systems --- bin/omarchy-reinstall | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 bin/omarchy-reinstall diff --git a/bin/omarchy-reinstall b/bin/omarchy-reinstall new file mode 100755 index 00000000..cfcdee5b --- /dev/null +++ b/bin/omarchy-reinstall @@ -0,0 +1,18 @@ +#!/bin/bash + +set -e + +if gum confirm "Are you sure you want to reinstall all base packages and reset all default configs?"; then + # Reinstall all base packages + mapfile -t packages < <(grep -v '^#' "$OMARCHY_INSTALL/omarchy-base.packages" | grep -v '^$') + sudo pacman -Syu --noconfirm "${packages[@]}" + + # Copy over Omarchy configs + cp -R ~/.local/share/omarchy/config/* ~/.config/ + + # Use default bashrc from Omarchy + cp ~/.local/share/omarchy/default/bashrc ~/.bashrc + + # Reset any conflict from bad .bash_profile + echo "[[ -f ~/.bashrc ]] && . ~/.bashrc" | tee ~/.bash_profile +fi