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:
parent
4a468041cb
commit
308033bd10
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user