Allow selecting themes for deletion (#533)

Co-authored-by: Johan Gyllenspetz <gyllen@hey.com>
Co-authored-by: David Heinemeier Hansson <david@hey.com>
This commit is contained in:
Johan Gyllenspetz 2025-08-07 04:05:18 -07:00 committed by GitHub
parent 4a468041cb
commit 308033bd10
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -4,10 +4,10 @@
# Usage: omarchy-theme-remove <theme-name>
if [ -z "$1" ]; then
extra_themes=$(find ~/.config/omarchy/themes -mindepth 1 -maxdepth 1 -type d ! -xtype l -printf '%f\n')
mapfile -t extra_themes < <(find ~/.config/omarchy/themes -mindepth 1 -maxdepth 1 -type d ! -xtype l -printf '%f\n')
if [[ -n "$extra_themes" ]]; then
THEME_NAME=$(echo -e "$extra_themes" | gum choose --header="Remove extra theme")
if [[ ${#extra_themes[@]} -gt 0 ]]; then
THEME_NAME=$(gum choose --header="Remove extra theme" "${extra_themes[@]}")
else
echo "No extra themes installed."
exit 1