Jonathan Haddock has reworked my wallpaper script to use with gnome3, and here is his version. His original version can be found here http://www.jonsdocs.org.uk/wiki/index.php/Gnome3_Wallpaper_script.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/bash
set -e
#: Title            : wallpaper-for-gnome3
#: Date             : March 2014
#: Author           : Jonathan Haddock and Sharon Kimble (original version for another Desktop Environment)
#: Version          : 1.0
#: Description      : changes your wallpaper, and can be run from an alias
####################################################
#: Options          : 
# change - length of time (minutes) before the wallpaper changes again
# wallpapers - path to Wallpapers directory containing JPG files
#; Requirements     : shuf, gsettings (gnome 3)
#: License          : GNU GPL 3.0 or later
####################################################
# Options
change=10
wallpapers=/home/jonathan/Wallpapers
###################################################
while true; do
  BGFILE=`find $wallpapers -type f \( -name '*.jpg' -o -name '*.png' \) -print0 |   shuf -n1 -z`
    gsettings set org.gnome.desktop.background picture-uri file://$BGFILE
    gsettings set org.gnome.desktop.background picture-options stretched #stretched, scaled, zoom, centered, none, spanned, wallpaper
   sleep "$change"m
done


Comments

comments powered by Disqus