#!/bin/sh

# Function: Wallpaper Randomizer
# Adapted for Ubuntu from suggestions
# License: Public Domain
# Instructions: Place this script in a /bin directory
# and do a chmod +x on it.
# To run hourly:
# crontab -e
# @hourly /path/to/change_wallpaper.sh

BGNAME="$HOME/wallpaper.jpg"
RES='1920x1080'
wget -O $BGNAME http://supware.net/PaperSwap/PaperSwap?$RES

# Calling this command, even if the _name_ is the same as the previously
# downloaded file (wallpaper.jpg) forces it to be reloaded.
gconftool-2 -t str --set /desktop/gnome/background/picture_filename "$BGNAME"

# Possible values are "none", "wallpaper" (eg tiled), "centered", "scaled", "stretched"
gconftool-2 -t str --set /desktop/gnome/background/picture_options "stretched"

