#!/bin/bash # # Tools-Set_as_WallPaper -> (set image as wallpaper) # # Owner : Largey Patrick from Switzerland # patrick.largey@nazeman.org # www.nazeman.org # # Licence : GNU GPL # # Copyright (C) Nazeman # # Dependency : gdialog (gnome-utils) or zenity # : Nautilus # # Encoding UTF-8 # # Vers.: 1.00 11.02.2004 title="Set as Wallpaper" choix="choice" type="value" gconf="key gconf" none="none" wallpaper="wallpaper" centered="centered" scaled="scaled" stretched="stretched" case $LANG in fr* ) title="Définir comme fond d'écran" choix="choix" type="valeur" gconf="clé gconf" none="aucun" wallpaper="mosaïque" centered="centré" scaled="redimensionné" stretched="étiré" ;; esac # # fix gnome 2.2 bug # curpath=`echo $NAUTILUS_SCRIPT_CURRENT_URI | sed 's/file\:\/\///'` cd $curpath # # choice with centered tile ..... # if bckgrnd=`zenity --title "$title" --height 220 --list --radiolist --column "$choix" --column "$gconf" --column "$type" FALSE "none" "$none" FALSE "wallpaper" "$wallpaper" FALSE "centered" "$centered" FALSE "scaled" "$scaled" TRUE "stretched" "$stretched" 2>&1` then gconftool-2 --type string --set /desktop/gnome/background/picture_options "$bckgrnd" gconftool-2 --type string --set /desktop/gnome/background/picture_filename "$curpath/$1" fi