diff --git a/bin/omarchy-theme-bg-next b/bin/omarchy-theme-bg-next index f6e7f723..e073db5c 100755 --- a/bin/omarchy-theme-bg-next +++ b/bin/omarchy-theme-bg-next @@ -2,12 +2,12 @@ # Cycles through the background images available -THEME_NAME=$(basename "$(readlink "$HOME/.config/omarchy/current/theme")") +THEME_NAME=$(cat "$HOME/.config/omarchy/current/theme.name" 2>/dev/null) THEME_BACKGROUNDS_PATH="$HOME/.config/omarchy/current/theme/backgrounds/" USER_BACKGROUNDS_PATH="$HOME/.config/omarchy/backgrounds/$THEME_NAME/" CURRENT_BACKGROUND_LINK="$HOME/.config/omarchy/current/background" -mapfile -d '' -t BACKGROUNDS < <(find -L "$USER_BACKGROUNDS_PATH" "$THEME_BACKGROUNDS_PATH" -type f -print0 2>/dev/null | sort -z) +mapfile -d '' -t BACKGROUNDS < <(find -L "$USER_BACKGROUNDS_PATH" "$THEME_BACKGROUNDS_PATH" -maxdepth 1 -type f -print0 2>/dev/null | sort -z) TOTAL=${#BACKGROUNDS[@]} if [[ $TOTAL -eq 0 ]]; then