Years months of practice fitting my groceries inside my bike bags come handy. (it is quite rare to me to actually need to hang plastic bags from the handlebars! š
But I still can’t buy beer… the bags were filled up to the brim! š
Well, this is a bit of a script I wrote one year ago or so: I wanted to have the feature of rotating wallpapers back in GNOME 3.x (I’m pretty sure it existed back in GNOME 2.x! š ), hence I wrote a bit of Python that reads a list of images in a given folder, randomly picks one and sets it as the desktop wallpaper – pretty simple stuff!
[sourcecode language=”python” wraplines=”true”]#!/usr/bin/python
import os
import random
import mimetypes
import time
myBackgrounds = ‘~/wallpapers/’
def prepareList(pathname):
items = []
for item in os.listdir(myBackgrounds):
if "image" in mimetypes.guess_type(item)[0]:
items.append(item)
return items
def randomizeWallpaper(listOfFiles):
randomListIndex = random.randint(0,len(listOfFiles)-1)
#~ os.system(‘gsettings set org.gnome.desktop.background picture-uri "file:///’ + myBackgrounds + listOfFiles[randomListIndex] + ‘"’ ) # for GNOME session
os.system(‘xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitor0/image-path -s %s’ % (myBackgrounds + listOfFiles[randomListIndex])) # for Xfce WM
if __name__ == "__main__":
listOfWallpapers = prepareList(myBackgrounds)
randomizeWallpaper(listOfWallpapers)
[/sourcecode]
In order to keep it running automatically every # of hours, I’ve just edited my crontab file (/etc/crontab) to run it periodically (in the case below it is configured to run every 6 hours…):
[sourcecode language=”text”]
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
# For details see man 4 crontabs
# Example of job definition:
# .—————- minute (0 – 59)
# | .————- hour (0 – 23)
# | | .———- day of month (1 – 31)
# | | | .——- month (1 – 12) OR jan,feb,mar,apr …
# | | | | .—- day of week (0 – 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
# | | | | |
# * * * * * user-name command to be executed
0 */6 * * * manuel DISPLAY=:0.0 /home/manuel/bin/rotate-wallpapers.py > /dev/null
[/sourcecode]
And since my dynamic wallpaper folder is synced with Dropbox, I can have the same wallpapers in every computer I have access to (even – gah – Windows machines!). Furthermore, I also have all my wallpapers on my Android phone, courtesy of DropSync (which pulls the images from Dropbox whenever there’s a change in there and downloads them to a folder on my memory card) and a dynamic wallpaper thingy called Wallpaper Slideshow. Both are free of charge at the Play Store, and the latter is extremely configurable!
A final note regarding my collection of wallpapers: all of them are photos I took, I want them to remind me of places I’ve been to… and places where I want to be! š It really brightens my day whenever I see a lovely photo of River Douro on my work desktop, for instance… š
It has definitely been a while since I last rowed in the UK… Thankfully, I still trained a bit whilst in Portugal, therefore I reckon it is not going to be too bad tomorrow morning! š
The big problem: I have to (partially) cycle to the boathouse! It wouldn’t be that much of a problem if it wasn’t 10 miles away on hilly terrain with strong winds against me, though. Oh well, one has to endure certain sacrifices in order to get one’s rewards, right? š
Via Flickr:
Mudguards are not a very good idea when riding in the snow, apparently…
It is been snowing non-stop since this morning around here – everything is completely covered in white, and the thickness of the coating is now quite sizable (more than 5 cm, definitely!).
This morning I walked (yes, I did not want to risk my chances by cycling, since only the really major roads are gritted) to the University and took some photos of the campus and its amazing Canterbury views completely covered in white. It was quite a sight… and everyone was enjoying themselves, I saw a lot of families with kids playing in the snow and going down the hill on sledges – good thing that is reasonably hilly around here! š
Some photos (you can, of course, check the complete range on Flickr):



Via Flickr:
At this goes, soon my landlady’s flower pots will be completely covered! š
Ah, this is so beautiful and hypnotising (I can stay here looking outside the window for hours, just watching the snow falling…). Weather-permitting, I might go take some proper photos outside later in the day.
Vodafone UK has some free SMS-based services such as this one, in which you text a given number and it returns you your approximate location (I reckon based on cell tower location services..). This seemed like an interesting service, but I was failing to see the point of it – until I saw the rest of the text. Of course! The Brits and their drinking habits… š

… and I was asked to show my ID to do so. Apparently it is illegal for people under 18 to buy knives around here (even though the knife in my cutlery set would probably bend itself if I attempted to stab anyone :P, since I went for the cheapest I could find! ), and since according to many I still look like a teenager I was obviously asked to confirm my age.
Interestingly enough, the last time I bought cutlery around here no-one asked anything. Perhaps because I got an even cheaper-looking set? š