matthileo

wallpaper-to-lightdm

Oct 9th, 2011
319
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.87 KB | None | 0 0
  1. #!/bin/sh
  2. Wallpaper="/home/matt/.cache/wallpaper/*" #must be pointing to your home directory instead of 'matt'
  3. LoginImage="/usr/share/backgrounds/warty-final-ubuntu-unchanged.png"
  4.  
  5. if diff $Wallpaper $LoginImage >/dev/null ; then
  6.     echo "The LightDM background already matches your current wallpaper."
  7. else
  8.     echo "The LightDM background does not match your current wallpaper. Let's change it."
  9.     rm -rf /usr/share/backgrounds/warty-final-ubuntu.png
  10.     cp $Wallpaper /usr/share/backgrounds/warty-final-ubuntu.png
  11.     cp $Wallpaper /usr/share/backgrounds/warty-final-ubuntu-unchanged.png
  12.  
  13.     #darkens, desaturates, and blurs the image. comment this out if you want   
  14.     #requires imagemagick to work -- sudo apt-get install imagemagick
  15.     convert -modulate 40,40 -blur 0x10 /usr/share/backgrounds/warty-final-ubuntu.png /usr/share/backgrounds/warty-final-ubuntu.png
  16.  
  17.     echo "Done."
  18. fi
Advertisement
Add Comment
Please, Sign In to add comment