Advertisement
Guest User

Untitled

a guest
Dec 6th, 2016
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. 42 */4 * * * /home/ahmad/myBing/bingwallpaper.sh
  2.  
  3. #!/bin/bash
  4.  
  5. # This script is written by Ahmad Abdollahzade . use it , make it better and share it .
  6.  
  7. # Get download link and store it on downLink .
  8. downLink=$(./index.py)
  9.  
  10. # Making pic name .
  11. picName=$(echo $downLink | cut -f7 -d"/")
  12.  
  13. # Set picture options
  14. # Valid options are: none,wallpaper,centered,scaled,stretched,zoom,spanned
  15. picOpts="zoom"
  16.  
  17. if [ $downLink != "net is off" ]
  18. then
  19. mkdir -p $HOME/Pictures/BingDesktopImagePython/
  20. # Download the link by wget .
  21. wget -O $HOME/Pictures/BingDesktopImagePython/$picName "$downLink" &> /dev/null
  22. # Set the GNOME3 wallpaper
  23. gsettings set org.gnome.desktop.background picture-uri "file://$HOME/Pictures/BingDesktopImagePython/$picName"
  24. # Set the GNOME 3 wallpaper picture options
  25. gsettings set org.gnome.desktop.background picture-options $picOpts
  26. else
  27. echo -e "Net is off :("
  28. fi
  29.  
  30. # Exit the script
  31. exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement