#!/bin/bash # # Created by djazz # Dependencies: curl # You need Gnome or feh, depending on what DE/WM you use # IMGLIST="http://djazz.se/pony/wallpapers/images.txt" IMGSCRIPT="http://djazz.se/pony/wallpapers/image.php" DELAY=10 DOWNLOAD_DIR=/tmp USE_GNOME=0 # uses /tmp USE_FEH=1 # to make it loop over lines instead of spaces in filenames IFS=$'\n'; while true; do LIST=`curl -s "${IMGLIST}" | shuf` for i in $LIST; do echo "$i" if [ "$USE_GNOME" -eq 1 ]; then curl -s -G "${IMGSCRIPT}" --data-urlencode "f=$i" -o "$DOWNLOAD_DIR/next-wallpaper" mv "$DOWNLOAD_DIR/next-wallpaper" "$DOWNLOAD_DIR/wallpaper" gsettings set org.gnome.desktop.background picture-uri "file://$DOWNLOAD_DIR/wallpaper" fi if [ "$USE_FEH" -eq 1 ]; then curl -s -G "${IMGSCRIPT}" --data-urlencode "f=$i" | feh - --bg-fill & fi sleep ${DELAY}m done sleep 1 done