I thought to myself, “That would be really neat!” So a few days ago I made a simple wallpaper plugin that would paint a specified picture to the containment background. Once that was working I raided the weather plasmoid of its configuration code and choice parts of its backend and ported it to work in a Plasma Wallpaper plugin. The result? A Plasma Wallpaper plugin that changes the wallpaper depending on the weather at a set location is. To retrieve the weather it uses the weather dataengine introduced in KDE 4.2, as seen in the Weather plasmoid and the LCD Weather Station plasmoid. Dataengines for the win!
Code is available from trunk/playground/base/plasma/wallpapers/weather. It should build with KDE 4.2 and KDE 4.3. Here’s a small build tutorial:
- svn co svn://anonsvn.kde.org/home/kde/trunk/playground/base/plasma/wallpapers/weather
- cd weather
- mkdir build
- cd build
- cmake ../ -DCMAKE_INSTALL_PREFIX=/usr
- sudo make install
You should now be able to change the wallpaper type in Plasma’s Appearance settings from “Image” to “Weather”.
Here are screenshots (click for bigger ones), stay tuned for limitations and bugs:
Limitations and Bugs
This plugin is quite new, and as such there are several limitations. Here are the ones I know of:
- It displays tiled versions of 1280×1024 wallpaper. If your screen isn’t the exact size of the wallpaper, the wallpaper will loop.
- The “Wallpaper is loading” wallpaper is cut off in mid-sentence. Dunno how that happened, but I plan to redo that image eventually so it’s sorta just a placeholder for now.
- It doesn’t have images for all possible weathers.
- At the moment it won’t work with the NOAA ion since the plugin currently relies on the icon name returned by the weather dataengine, and the NOAA ion doesn’t return icon names
- Setting the config the first time works, but if you change the config a second time the change won’t take place until you restart Plasma. (Though the preview in the Appearance dialog changes properly, it’s sorta weird)
So, I hope you enjoy it. Once it gets a bit less buggy I’ll probably post this on kde-look and maybe make some K/Ubuntu packages for my PPA.
Oh, in semi-related news I’ve also picked up maintenance of the QuickAccess plasmoid and have done a quick bugfix release that ports the applet to KDE 4.2 and fixes a crash: http://kde-look.org/content/show.php?content=101968
Best wishes to the original author.