mirror of
https://github.com/basecamp/omarchy.git
synced 2026-02-17 15:25:37 +00:00
21 lines
709 B
Bash
21 lines
709 B
Bash
echo "Migrate to new theme setup"
|
|
|
|
THEMES_DIR="$HOME/.config/omarchy/themes"
|
|
CURRENT_THEME_LINK="$HOME/.config/omarchy/current/theme"
|
|
|
|
# Get current theme name from symlink before removing anything
|
|
CURRENT_THEME_NAME=""
|
|
if [[ -L $CURRENT_THEME_LINK ]]; then
|
|
CURRENT_THEME_NAME=$(basename "$(readlink "$CURRENT_THEME_LINK")")
|
|
elif [[ -f "$HOME/.config/omarchy/current/theme.name" ]]; then
|
|
CURRENT_THEME_NAME=$(cat "$HOME/.config/omarchy/current/theme.name")
|
|
fi
|
|
|
|
# Remove all symlinks from ~/.config/omarchy/themes
|
|
find "$THEMES_DIR" -mindepth 1 -maxdepth 1 -type l -delete
|
|
|
|
# Re-apply the current theme with the new system
|
|
if [[ -n $CURRENT_THEME_NAME ]]; then
|
|
omarchy-theme-set "$CURRENT_THEME_NAME"
|
|
fi
|