diff --git a/bin/omarchy-theme-bg-next b/bin/omarchy-theme-bg-next index 0356d6f6..13852207 100755 --- a/bin/omarchy-theme-bg-next +++ b/bin/omarchy-theme-bg-next @@ -8,7 +8,11 @@ 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" -maxdepth 1 -type f -print0 2>/dev/null | sort -z) +mapfile -d '' -t BACKGROUNDS < <( + find -L "$USER_BACKGROUNDS_PATH" "$THEME_BACKGROUNDS_PATH" -maxdepth 1 -type f \ + \( -iname '*.jpg' -o -iname '*.jpeg' -o -iname '*.png' -o -iname '*.gif' -o -iname '*.bmp' -o -iname '*.webp' \) \ + -print0 2>/dev/null | sort -z +) TOTAL=${#BACKGROUNDS[@]} if (( TOTAL == 0 )); then