Advertisement
voyeg3r

cwall

Dec 30th, 2013
368
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.23 KB | None | 0 0
  1. #!/usr/bin/env bash
  2. # =================================================
  3. # CREATED: Seg 30/Dez/2013 hs 15:07
  4. # LAST CHANGE: 2013 Dez 30 15:11:22
  5. # THIS SCRIPT AIMS: change wallpaper in gnome-shell
  6. # AUTHOR: Sérgio Luiz Araújo Silva
  7. # SITE: http://vivaotux.blogspot.com
  8. # TWITTER: @voyeg3r
  9. # SKYPE: sergioaraujosilva
  10. # =================================================
  11. # source: http://superuser.com/questions/298050/periodically-changing-wallpaper-under-gnome-3
  12.  
  13. # CHANGE THE FOLDERS NAME AND USER!
  14. # to run this script automaticaly in gnome-shell create
  15. # this file in ~/.config/autostart/cwall.desktop
  16.  
  17. # ------- cwall.desktop file ----
  18. # [Desktop Entry]
  19. # Type=Application
  20. # Exec=/home/sergio/bin/cwall
  21. # Hidden=false
  22. # NoDisplay=false
  23. # X-GNOME-Autostart-enabled=true
  24. # Name[pt_BR]=changewallpaper
  25. # Name=changewallpaper
  26. # Comment[pt_BR]=change wallpaper periodicaly
  27. # Comment=change wallpaper periodicaly
  28. # ---------------------------------------------
  29.  
  30. WP_DIR=/home/sergio/Pictures/wallpapers
  31.  
  32. cd $WP_DIR
  33. while [ 1 ]
  34.   do
  35. set -- *
  36.   WP=`ls -1 "$WP_DIR" | shuf -n1`
  37.   gsettings set org.gnome.desktop.background picture-uri "file://$WP_DIR/${WP}"
  38.  
  39.   # time mesured in seconds, 300 means 5 minutes
  40.   sleep 300
  41. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement