Desktop Hacks ;)

Some code you might even find useful on your Linux desktop.

Gnome Desktop Decorator

Dance and Drink and Screw

A small, dirty and last but not least nightly Python/GTK hack that downloads the newest Nature images from art.gnome.org and displays a selection window. If you like to have a new wallpaper, simply select the desired picture by clicking on it. The full-sized image will be downloaded and set as your (Gnome) desktop wallpaper.

Updated 2007-04-20: Add preview loading progress display, direct image downloading with gtk.gdk.PixbufLoader, choses a random section on invocation (GNOME, Nature, Abstract or Other) and finally displays download progress for the full image. Better file naming scheme and downloaded items are put into ~/.wallpapers/, so you can easily find them and remove/edit them.

2007-09-26: I've just found out about a similiar tool by Alberto Ruiz: Jilorio.

Updated 2008-01-26: Add command-line option to the script, so if you don't want to have a random section selected for you, you can pass the section (ex. nature) as a command line parameter.

Download


Evolution Mail Notifier

Oh boy, we've got a message!

This simple python script (needs PyGTK >=2.10 and the Python D-Bus bindings) subscribes to Evolution's D-Bus signals that notify the user about new mail messages and read messages and plays a sound. It also displays a gtk.StatusIcon while Evolution has not been focused (and at least some other mails read).

For me, Evolution's new mail notification sounds do not work, so this small script is a nice replacement and also adds a tray icon so I can see that there's a new mail even on other virtual desktops. Put it in your gnome-session and be happy.

Updated 2007-04-20: I've updated the mail notifier to keep track of folders with unread mail in them and only make a sound once for every folder. I've also added the ability to specify only selected folders that can emit a notification on new mail messages. Another addition drags in python-notify as a dependency, so we have cute little notification boxes for new mails :) Another nice feature is the ability to set the wave filename to some wildcard match (e.g. ~/lib/mail/*.wav) and you will hear a randomly-chosen wave file every time you get new mail. That should cheer you up a little. See below for a page where you can download mail notification wave files.

Updated 2007-08-29: To get this script working with recent Evolution versions, activate Preferences - Mail Preferences - New Mail Notification - Beep when new mail arrives. After that, make sure you have the New Mail Notification plugin activated and evolution-newmail should start working again. A problem that I had recently was that when evolution checked new mail folders and new mail was in my INBOX and in a folder that is checked just after the inbox, evolution-newmail would play two sounds at once. I've added a 10-seconds-timeout to the sound playing feature, so if a sound is played, there won't be a sound played for the next 10 seconds, which should make evolution-newmail react better to multiple folders having new mails.

Updated 2007-09-13: After happily using evolution-newmail since late August, I've thought about two annoyances: First, the "sound" is played all the time, even when I'm currently working on something, e.g. browsing the web. The sound, IMHO, should only be played when I'm not directly looking at the screen. This is now implemented by watching the X11 idle time and skipping sound playback if it's less than 10 seconds (this is configurable). Another problem is than when I'm moving around mail in Evolution, the notification keeps popping up telling me that there are new mails in watched folders (because I'm moving a mail into my inbox from the Spam folder, for example). To fix this issue, I'm now also keeping track of the X11 focused window class and will never display the notification when "evolution" is the focused window. This makes evolution-newmail a bit more intelligent and a more pleasant experience :) A description of the code can be found on my blog under X11 idle time and focused window in Python.

Updated 2007-10-25: Evolution 2.12.0 now contains its own new mail notification that provides a tray icon and a libnotify window, making the evolution-newmail.py script obsolete. The script will stay here for interested people or for users of Evolution pre-2.12.0, but I don't plan to update the script anymore for obvious reasons.

Similiar project: Quim Calpe's Mail-Notifier
Download notification sounds from Clay's Mail Call Wav Page

Download


Audio Converter

Drag and drop it. Ogg, MP3 or Flac - you name it!

After I cut my .wav files with wavbreaker, I have to prepare them for archival (convert to Flac) and for my private podcast feed (convert to Ogg Vorbis). This is the only step left in my weekly radio recording cutting session that has had to be done on the command line. Enter audio-converter.py.

Update 2007-07-21: Another nice sound converter with more features can be found on soundconverter.berlios.de!

This small Python script gives you instant, GTK-ish drag-and-drop pleasure for all your wave file conversion needs. Simply choose which file type you want to convert your wave files to and drag-and-drop the wave files to be converted from your file manager, wait a bit and freu you about stilsicherheit in sachen audio convertitaet.

You can easily add support for more codecs/converters by simply editing the script and adding the corresponding converter information.

Download


Gnome PhotoBooth for iSight

There is now a real Photobooth-like application available from Daniel Siegel as part of the Google SOC, to get more information go to the Cheese homepage.

Mirror, Mirror on the Wall

You have this wonderful MacBook and it has a built-in iSight. On Debian, you have installed the linux-uvc-source package and built the kernel modules for your cam. You've loaded the driver as described on the web, and you can test your iSight with, for example Ekiga. What you can't do is to use your iSight to take Photos in an uncomplicated manner, it should be about as easy as clicking on a button.

This small PyGTK/PyGST (GStreamer) hack gives you a bit of PhotoBooth love you know from Mac OS X. You have a live preview (640x480) of your camera's current image and can take a snapshot with the click of a button. After you've collected at most six snapshots, you can click on "save photos" which will save the photos you've just taken to your Desktop where you can move, edit, print, mail the pictures.

You need a v4l2-capable video device (the iSight built into Apple MacBooks and MacBook Pros are such devices, if used with the linux-uvc driver) and a recent version of gstreamer-0.10 + python-gstreamer + python-gtk2. Debian Lenny provides these.

Possible improvements

Download


The Pythonfied Perlific SMS Sender (smpy)

smpy is now available in a version specifically for Nokia Internet Tablets (OS2008, e.g. N8x0), you can find the distribution here: smpy for Nokia Internet Tablets

Speedy Gonzales SMS Sending Stuff

This is a sequel to the 2006-released command-line tool smp, which utilized WWW:Mechanize to carry out automatic SMS sending over sms.a1.net. This version improves upon the original smp in several ways:

Before you can use smpy, you first have to configure it (enter your A1.net username and password). This is done by running smpy with the --configure parameter. The configuration is saved for later use, and you can put a shortcut to smpy onto your gnome-panel or even assign a hotkey for it, depending on your SMS usage patterns. I suggest you use the stock_mail-send icon theme icon as the icon for the shortcut.

Update 2007-10-06: Updated smpy to work with python-evolution 0.0.3. Please update your dependencies and grab the new version.

Update 2007-10-13: Added window border to fix problems with window managers like Metacity. Also added title + icon.

Update 2007-12-26: Make evolution support optional and fallback to no evolution support for older python-evolution versions.

Update 2008-01-02: Hide the search box when we cannot find Evolution support or there are no contacts available. Also write some default text to the text entry (select all by default).

Dependencies

Download


Thomas Perl · 2008-01-02