vajrasky / wallpapoz

Wallpapoz -- Gnome and XFCE Desktop Wallpapers Configuration Tool
http://vajrasky.wordpress.com/wallpapoz
GNU General Public License v2.0
22 stars 15 forks source link

No support for feh #1

Open keskad opened 14 years ago

keskad commented 14 years ago

There is no support for feh. Wallpapoz cant be used on Fluxbox, Openbox and other lightweight desktops.

patch:

class method to change desktop wallpaper

def change_wallpaper(self, wallpaper):

# WebNuLL implementation of feh for wallpapoz
if os.path.isfile("/usr/bin/feh"):

    # default most used option
    feh_style="--bg-scale"

if self.wallpaper_style == "centered":
    feh_style = "--bg-center"
elif self.wallpaper_style == "wallpaper":
    feh_style = "--bg-fill"
elif self.wallpaper_style == "scaled":
    feh_style = "--bg-scale"
elif self.wallpaper_style == "stretched":
    feh_style = "--bg-tiled"
else:
    feh_style = "--bg-scale"

os.system('feh '+feh_style+' '+wallpaper)

else:
    os.system('gconftool-2 -t string -s /desktop/gnome/background/picture_filename ' + '"' + wallpaper + '"' + ' -s /desktop/gnome/backgroundpicture_options ' + self.wallpaper_style)