XFCE wallpaper changer, take images from multiple directories, workaround, random desktop

#!/bin/bash
source=/home/user/Pictures
destination=/usr/share/backgrounds
sudo rm -rf "$destination" && sudo mkdir -p "$destination"
images=$(find $source | grep -i -E "\.j.*g$")
echo "$images"
printf %s "$images" | while IFS= read -r one
do {
sudo ln -s "$one" "$destination/$(echo "$one" | sed "s|$source\/||;s/\//./g")"
} done

No comments: