Windows only.
Run this at startup and it chooses a random desktop background from a folder. Allows you to cycle through them as well if you dont like the one chosen.
Needs:
-Python 2.5.4
-PIL (for the converter script only) = http://effbot.org/downloads/PIL-1.1.6.win32-py2.5.exe
-A brain
Also here is a converter script to convert all image files to jpeg, so they can be set as the background:
python Code:
# Some help from [url]http://www.velocityreviews.com/forums/t339757-convert-all-images-to-jpeg.html[/url]
# Input folder
path = 'C:\Users\Tom\Pictures\Images'
# Output folder
opath = 'C:\Users\Tom\Pictures\jpgs'
import glob
import Image
import os
file_list = glob.glob(path+'\*.*')
for image in file_list:
try:
out_path = os.path.split(image)[1].split('.')[0]
Image.open(image).convert('RGB').save(opath+'\\'+out_path+'.jpg','JPEG')
print 'Converting to '+opath+'\\'+out_path+'.jpg'
except Exception,e:
print e
Here is the changer code:
python Code:
# Change the desktop background to something random
import ctypes
import sys
import glob
import random
path = r'C:\Users\Tom\Pictures\jpgs'
silent = False
# Change the shit
def set_wallpaper():
files = glob.glob(path+'\*.jpg')
choice = random.choice(files)
if not silent:
print 'File %s chosen'%choice
cs = ctypes.c_buffer(choice)
b = ctypes.windll.user32.SystemParametersInfoA(20 ,1, cs, 1)
set_wallpaper()
if not silent:
print 'Enter "1" to cycle through backgrounds'
if not raw_input() == "1":
sys.exit()
print 'Press enter to change it again'
while True:
raw_input()
set_wallpaper()