EDIT: Sep-28-2010 : as of a while ago 1x.com changed how their random images are served so this script no longer works. i’ll see if i can use a different site as pointed out in the comments.

so after creating the evilwm random wallpaper script i decided that i wanted to use the fixed resolution images from 1x.com.

here is the script i made up with an explanation below:

#!/bin/bash

if [ -d /tmp/jpg/ ];
then
    echo dir exists
else
    mkdir /tmp/jpg/
fi

if [ -f /tmp/jpg/1x.txt ];
then
    echo file exists
else
    touch /tmp/jpg/1x.txt
fi

while :;do
    FILENAME=`cat /tmp/jpg/1x.txt | egrep random | egrep main | egrep jpg | cut -d\" -f32 | cut -d= -f2 | cut -d\& -f1`
    curl --silent http://1x.com/photo/random/ > /tmp/jpg/1x.txt
    wget http://imghost.1x.com/${FILENAME} -O /tmp/jpg/${FILENAME} > /dev/null 2>&1
    #/usr/bin/feh --bg-center /tmp/jpg/${FILENAME}
    #xv -quit -root -rmode 5 -max /tmp/jpg/${FILENAME}
    sleep 60
done

all this script does is gets the html from http://1x.com/photo/random/, cuts it accordingly to grab the jpg name and then wget’s the proper jpg.
make sure to uncomment either the feh line or xv line according to tastes.

you can also change the sleep interval if you want to make it shorter or longer.