Prevent bg-next from taking non-images
This commit is contained in:
@@ -8,7 +8,11 @@ THEME_BACKGROUNDS_PATH="$HOME/.config/omarchy/current/theme/backgrounds/"
|
|||||||
USER_BACKGROUNDS_PATH="$HOME/.config/omarchy/backgrounds/$THEME_NAME/"
|
USER_BACKGROUNDS_PATH="$HOME/.config/omarchy/backgrounds/$THEME_NAME/"
|
||||||
CURRENT_BACKGROUND_LINK="$HOME/.config/omarchy/current/background"
|
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[@]}
|
TOTAL=${#BACKGROUNDS[@]}
|
||||||
|
|
||||||
if (( TOTAL == 0 )); then
|
if (( TOTAL == 0 )); then
|
||||||
|
|||||||
Reference in New Issue
Block a user