No need for this, using dmenu instead.
Use dmenu (with imlib2) for setting the wallpaper with imagemagick (display).