Advertisement
Guest User

Untitled

a guest
Jul 21st, 2015
227
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.30 KB | None | 0 0
  1. #!/bin/env bash
  2.  
  3. ###############################################################################
  4. # Display a fullscreen slideshow of the selected files
  5. ###############################################################################
  6. #
  7. # AUTHOR: Karl Bowden <kbowden@pacificspeed.com.au>
  8. #
  9. # CREDITS: Brian Connelly <pub@bconnelly.net> - For the slideshow script
  10. # that I based this script on.
  11. #
  12. # DESCRIPTION: This script sets the background in Gnome2 the the selected
  13. # filename.
  14. #
  15. # REQUIREMENTS: Nautilus file manager
  16. # Gnome2
  17. # gdialog, which is usually included in the gnome-utils package
  18. #
  19. # INSTALLATION: copy to the ~/.gnome2/nautilus-scripts directory
  20. #
  21. # USAGE: Select the file that you would like to use as your wallpaper
  22. # in Nautilus, right click, go to Scripts, and then select this
  23. # script. You will then be asked to selest how you would like
  24. # the image displayed.
  25. #
  26. # VERSION INFO:
  27. # 0.2 (20150624) - use xdialog instead gdialog
  28. # - remove nasty if
  29. # 0.1 (20020928) - Initial public release
  30. #
  31. # COPYRIGHT: Copyright (C) 2002 Karl Bowden <kbowden@pacificspeed.com.au>
  32. # COPYRIGHT: Copyright (C) 2015 Ivaylo Kuzev <ivo@stotinkaos.net>
  33. #
  34. # LICENSE: GNU GPL
  35. #
  36. ###############################################################################
  37.  
  38. WALLPAPER=$(Xdialog --title "Wallpaper Options" \
  39. --radiolist "Picture Options:" 60 100 10 1 Wallpaper on 2 Centered off 3 Scaled off 4 Stretched off 2>&1)
  40.  
  41. if [ $WALLPAPER = "1" ]; then
  42. gconftool-2 --type=string --set /desktop/gnome/background/picture_options wallpaper
  43. gconftool-2 --type=string --set /desktop/gnome/background/picture_filename $NAUTILUS_SCRIPT_SELECTED_FILE_PATHS
  44. elif [ $WALLPAPER = "2" ]; then
  45. gconftool-2 --type=string --set /desktop/gnome/background/picture_options centered
  46. gconftool-2 --type=string --set /desktop/gnome/background/picture_filename $NAUTILUS_SCRIPT_SELECTED_FILE_PATHS
  47. elif [ $WALLPAPER = "3" ]; then
  48. gconftool-2 --type=string --set /desktop/gnome/background/picture_options scaled
  49. gconftool-2 --type=string --set /desktop/gnome/background/picture_filename $NAUTILUS_SCRIPT_SELECTED_FILE_PATHS
  50. elif [ $WALLPAPER = "4" ]; then
  51. gconftool-2 --type=string --set /desktop/gnome/background/picture_options stretched
  52. gconftool-2 --type=string --set /desktop/gnome/background/picture_filename $NAUTILUS_SCRIPT_SELECTED_FILE_PATHS
  53. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement