Advertisement
Guest User

Set-as-wallpaper script for GNOME 3

a guest
Aug 20th, 2014
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.81 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. ###############################################################################
  4. # GNOME 3 VERSION AUTHOR:   Ahmad Youssef <16c7d114@opayq.com>
  5. #
  6. # Original author notes can be found below.
  7. ###############################################################################
  8.  
  9.  
  10.  
  11. ###############################################################################
  12. # Display a fullscreen slideshow of the selected files
  13. ###############################################################################
  14. #
  15. # AUTHOR:   Karl Bowden <kbowden@pacificspeed.com.au>
  16. #
  17. # CREDITS:  Brian Connelly <pub@bconnelly.net> - For the slideshow script
  18. #       that I based this script on.
  19. #
  20. # DESCRIPTION:  This script sets the background in Gnome2 the the selected
  21. #       filename.
  22. #
  23. # REQUIREMENTS: Nautilus file manager
  24. #       Gnome2
  25. #       gdialog, which is usually included in the gnome-utils package
  26. #
  27. # INSTALLATION: copy to the ~/.gnome2/nautilus-scripts directory
  28. #      
  29. # USAGE:    Select the file that you would like to use as your wallpaper
  30. #       in Nautilus, right click, go to Scripts, and then select this
  31. #       script. You will then be asked to select how you would like
  32. #       the image displayed.
  33. #
  34. # VERSION INFO:
  35. #       0.1 (20020928) - Initial public release
  36. #
  37. # COPYRIGHT:    Copyright (C) 2002 Karl Bowden <kbowden@pacificspeed.com.au>
  38. #
  39. # LICENSE:  GNU GPL
  40. #
  41. ###############################################################################
  42.  
  43. WALLPAPER=$(gdialog --title "Wallpaper Options" --radiolist "Picture Options:" 60 100 10 1 Wallpaper on 2 Centered off 3 Scaled off 4 Stretched off 5 Zoom off 6 Spaned off 2>&1)
  44.  
  45. if [ $WALLPAPER = "1" ]; then
  46.  
  47.     gsettings set org.gnome.desktop.background picture-options wallpaper
  48.     gsettings set org.gnome.desktop.background picture-uri file://$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS
  49. fi
  50.  
  51. if [ $WALLPAPER = "2" ]; then
  52.  
  53.     gsettings set org.gnome.desktop.background picture-options centered
  54.     gsettings set org.gnome.desktop.background picture-uri file://$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS
  55. fi
  56.  
  57. if [ $WALLPAPER = "3" ]; then
  58.  
  59.     gsettings set org.gnome.desktop.background picture-options scaled
  60.     gsettings set org.gnome.desktop.background picture-uri file://$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS
  61. fi
  62.  
  63. if [ $WALLPAPER = "4" ]; then
  64.  
  65.     gsettings set org.gnome.desktop.background picture-options stretched
  66.     gsettings set org.gnome.desktop.background picture-uri file://$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS
  67. fi
  68.  
  69. if [ $WALLPAPER = "5" ]; then
  70.  
  71.     gsettings set org.gnome.desktop.background picture-options zoom
  72.     gsettings set org.gnome.desktop.background picture-uri file://$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS
  73. fi
  74.  
  75. if [ $WALLPAPER = "6" ]; then
  76.  
  77.     gsettings set org.gnome.desktop.background picture-options spanned
  78.     gsettings set org.gnome.desktop.background picture-uri file://$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS
  79. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement