Always use an alpha channel Without this, some PNGs don't render properly.
Also use GTK for drawing to the root window... Strange but apparently needed.
Use Xlib rather than GTK/GDK for setting the wallpaper This allows urxvt & friends to display the wallpaper with pseudo-transparency.
If parameter is a directory, choose a random picture from that directory