ajoergensen

setwallpaper.sh

Oct 17th, 2014
275
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.80 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. IFS='
  4. '
  5. # Change this to where the wallpapers are stored
  6. DIR="$HOME/etc/wallpaper"
  7.  
  8.  
  9.  
  10. while true
  11.  do
  12.         PIC=$(ls $DIR/*.* | shuf -n1)
  13.         # Uncomment based on desktop environment
  14.     # XFCE:
  15.     #/usr/bin/xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitor0/image-path -s ${PIC}
  16.     #/usr/bin/xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitor0/image-style -s 5
  17.     # GNOME2
  18.     #gconftool-2 --type=string --set /desktop/gnome/background/picture_filename ${PIC}
  19.     #gconftool-2 --type=string --set /desktop/gnome/background/picture_options zoom
  20.     # GNOME/Unity/Cinnamon
  21.     #gsettings set org.gnome.desktop.background picture-uri file://${PIC}
  22.     #gsettings set org.gnome.desktop.background picture-options zoom
  23.     # Generic - uses feh
  24.     #feh --bg-fill ${PIC}
  25.         sleep 120
  26. done
Advertisement
Add Comment
Please, Sign In to add comment