Getting new mail onto the desktop

I had nice last weekend gathering new harvest of apples, drinking fresh apple juice and playing with SuperKaramba widgets – a good opportunity to take a sort of “recreational programming”. Perhaps all modern KDE users know those nice resource eaters eye-candies which are living right on the desktop surface and displaying the clocks, calendars, weather forecasts, system monitors and so on.

Instead of developing some Yet Another Big Animated Clock, I decided to write something practical. What I’d like to have is a widget which would ask my e-mail client (KMail) for the headers of the latest unread messages to show them on the desktop.