Files
omarchy/bin/omarchy-reinstall
David Heinemeier Hansson 6529472cad No output
2025-10-23 11:58:49 -07:00

25 lines
881 B
Bash
Executable File

#!/bin/bash
set -e
echo -e "This will reinstall all the default Omarchy packages and reset all default configs.\nWarning: All changes to configs will be lost.\n"
if gum confirm "Are you sure you want to reinstall and lose all config changes?"; then
echo "Resetting Omarchy repository"
git -C "$OMARCHY_PATH" switch master
git -C "$OMARCHY_PATH" reset --hard HEAD
git -C "$OMARCHY_PATH" pull
echo "Reinstalling all Omarchy packages"
mapfile -t packages < <(grep -v '^#' "$OMARCHY_PATH/install/omarchy-base.packages" | grep -v '^$')
sudo pacman -Syu --noconfirm "${packages[@]}"
echo "Resetting all Omarchy configs"
cp -R ~/.local/share/omarchy/config/* ~/.config/
cp ~/.local/share/omarchy/default/bashrc ~/.bashrc
echo '[[ -f ~/.bashrc ]] && . ~/.bashrc' | tee ~/.bash_profile >/dev/null
# TODO: Should reset limine
# TODO: Should reset plymouth
fi