After refactoring the core of decibel to be independent of KDE, I’ve decided to take a little break from my summer of code project while my mentor reviews all the changes I’ve made so far. So, instead of taking a holiday from KDE and computers for the last two days I’ve been working on a little project that I’ve wanted to do since I saw the idea mentioned by Aaron in an interview some time ago (when I googled for it this evening, I couldn’t find it again, so forgive me for not linking). I interpreted what he said as meaning “plasma doesn’t just need to revolutionise the desktop but could even spread into the internet space by having plasmoids on web pages”.
So, I set about making this possible. It was easier than I thought thanks to the wonderful trolls who recently released an Open Source QT addon that wraps the Netscape Plugin API. In fact, most of the two days I’ve spent getting this basic browser plugin made were spent tracking down the reason why adding a dependency on KDE stopped mozilla loading it – it turned out to be “-fvisibility=hidden” that is added to the CXX_COMPILER_FLAGS by FindKDE4.cmake.
Now, don’t get excited yet – this really is rudimentary, but there is now a plugin that works with firefox (not tested with anything else yet) and allows web pages to contain plasmoids. It uses the plasmoids already installed on your computer, but in the future I can envision it allowing scripted plasmoids provided by the web site you are visiting. Also, at the moment it only allows embedding of individual plasmoids, but again in future it could allow embedding of containments – you could even have a page that allows rearranging of plasmoids much like how you can rearrange the boxes on your Facebook profile. You could even perhaps drag plasmoids from a web page to your desktop! The posibilites seem endless… (Apologies to Aaron and other plasma devs for any ideas here that are not original and that I poached from them and then forgot about!)
Anyway, bringing my imagination back down to earth, here’s a screenshot of what’s already possible.
The clocks all work, honest (The only major known bug is that the right click menu text doesn’t show up, but I have a feeling that someone with more KDE-fu than me will fix that in a heartbeat).
If you want to have a look for yourself, the code is currently in available here in a git repo. Check out the master branch, then compile it in you KDE4 build environment (you will need very recent trunk), and it should Just Work (TM). See the README file for random ramblings about how to debug when it doesn’t .
Enough of that sidetrack! Tomorrow I return to Decibel (which I will blog about again shortly as a huge amount has and is happening on that front). Also, there’s a bug day this Sunday… you know the drill by now, and if you don’t, watch the planet for a dedicated blog about that soon.
UPDATE: This approach currently does not work for Konqueror, but it has been pointed out to me that it is already possible to embed local plasmoids in Konqueror via a kpart. Details on Harri Porten’s blog.