Bash Script to Change Wallpaper
#! /bin/bash
WALLPAPERS="/path/to/wallpapers/directory"
ALIST=( `/bin/ls -w1 $WALLPAPERS` )
RANGE=${#ALIST[@]}
let "number = $RANDOM"
let LASTNUM="`/bin/cat $WALLPAPERS/.last` + $number"
let "number = $LASTNUM % $RANGE"
echo $number > $WALLPAPERS/.last
feh --bg-center $WALLPAPERS/${ALIST[$number]}