diff --git a/usr/bin/jgwallpaperchanger b/usr/bin/jgwallpaperchanger index 6c098c1..679ada1 100755 --- a/usr/bin/jgwallpaperchanger +++ b/usr/bin/jgwallpaperchanger @@ -181,8 +181,12 @@ if ! pgrep -f "mbwallpaper -s" > /dev/null; then readarray -t wpdirs < <(grep -v '^\s*$\|^#\|^\s*\#' "$CNF_FILE") [[ -d "$(xdg-user-dir PICTURES)/imagick" ]] && wallp=$(shopt -s nullglob ; set -- $(xdg-user-dir PICTURES)/imagick/*.{jpg,JPG,jpeg,JPEG,png,PNG,avif} ; echo $#) - [[ "$wallp" -gt "1" ]] && wpdirs=("$(xdg-user-dir PICTURES)/imagick" "${wpdirs[@]}") - + if [[ "$wallp" -gt "1" ]];then + imagickdir="$(xdg-user-dir PICTURES)/imagick" + imagickdir=${imagickdir/$HOME/\~} + wpdirs=("$imagickdir" "${wpdirs[@]}") + fi + wpdirs=("/usr/share/backgrounds/" "${wpdirs[@]}") #notify-send.sh "DIRS" "${#wpdirs[@]}"