Hey again, nice to see y’all. I had to take a summer-long hiatus from the FLOSS world due to some more important events in my personal life, but I’m slowly crawling back.
But thats boring stuff nobody wants to hear about, so how about this neat bit of info: I’m working on getting removable media automounting back into KDE4. Sometime last night I was browsing b.k.o looking at the various junior jobs, when I found #164053 – KDE should automatically mount all removable media at logon or when plugging in. First thing this morning, I started looking into it. I poked around with Solid to see what was capable, and I eventually got down to work. A few hours later, I commited my device-automounter to playground.
So check it out and give it a shot. Right now its just a KDED module and a KCM page, and I hope it can stay that simple. Eventually I hope to add a bit more intelligence to it, such as only mounting devices at login if they were mounted when you logged out. That way the bug report would be fulfilled properly.
A few hours ago I moved Bubblemon out of kdereview and into kdeplasma-addons.
Keep an eye out when 4.3 ships. You’ll like it :)
Last night I committed a quick patch to Plasma’s plasmaclock library that almost all plasma clocks use. It changes the configuration interface a little bit to add one neat feature: speaking the time.
Now, you can configure any plasma clock to speak the current time every Nth minute of the hour. I was inspired by a neat little Android app I found the other day for my G1 called “Talking Clock”, which speaks the time every hour. Very handy.
As part of changing the configuration interface, it renames the “Calendar” page to “General” and uses Applet::icon(). I also went in and changed the analog-clock and digital-clock plasmoids’ “General” pages to “Appearance”. Now there aren’t a whole mess of clock icons in the settings :)
The middle of last year, I started working on Glovebox, a rather ambitious project for a car computer environment.
One of the biggest choices I made was to write my own set of UI libraries on top of Qt to mirror the kind of integration that KDE has. This was mostly because I didn’t want to drag in the few hundred MB needed for Plasma.
Wow, that past me was an idiot. Lets all point and laugh.
Ever since Plasma got moved into kdelibs, I’ve been thinking on and off about building Glovebox on top of KDE. For some reason over the past few weeks I started thinking more seriously about it.
At any rate, I’ve decided to go ahead and do that. I’ve also thought about another good idea. I’ll allow Glovebox’s UI to run under an X server in addition to the original idea of using Qt Embedded’s framebuffer stuff.
So most of tonight will be spent hacking the build system and Launchpad into shape, followed by restructuring the page plugin system to use KParts.
So in my last post, I said this in reference to bubblemon:
While writing this, I found a few possible bugs in plasma. I say possible, because I’ve been known to be an idiot sometimes
Turns out using setAspectRatioMode(Plasma::Square) fixes it:

Bubblemon in the panel with its proper round shape
You’d think, however, that using KeepAspectRatio (as I previously was) would suffice. If I manually resize, plasma should keep my aspect ratio. I understand now why plasma shouldn’t keep the ratio constant in the panel, but the apidox doesn’t seem to explain that.
Anyways, I added two important (and two mundane) features to bubblemon this morning at some ungodly hour. Anti-aliasing, smooth value transitions, label scaling, and support for any ksysguard sensor. To get the last one, I added some code to the systemmonitor dataengine that supplies various metadata, such as maximum, minimum, translated name, and translated units. Now its a lot easier for anyone to get, say, the current total memory on the system without having to request mem/physical/free and mem/physical/used.
The label scaling is the other important feature. Quite simply, when the label is too big to fit in the sensor, the text gets word wrapped and the font keeps shrinking ’till it fits. If the text is too small for even a 1pt font to fit it in, it won’t even bother showing text. After all, text at that size is just impossible to read. IMHO, I think this makes bubblemon as complete as it can be.
Now I can go back to helping hack KPackageKit into a form resembling a release. And sleeping.
Most of this weekend I spend digging through some of the lightest documentation around, trying to figure out how to make a simple plasmoid in python. Took me over two days, but I finally got it done. I even wrote a tutorial on how I did it!
The fruits of my labor:

And of course, powerchart-pre0.1.plasmoid
Over the past week or so, Daniel and I have been hacking on improving KPackageKit. Our original goal was to get it into the 4.2 release. Doing this depended on getting PolicyKit-KDE into base before release time, but that didn’t happen either. But hey, now we’ve got a few months to do tons more improvement.
The biggest change was how the automatic updates are handled. Previously, kded ran kpackagekit --smart-update once a day to check PackageKit if there were any interesting updates. Then it’d show a notification about it and ask the user if they want to upgrade. Now, I’ve moved that chunk into our transaction list icon. kded now calls kpackagekit-smart-icon --update to check for updates. The interval is configurable.

KPackageKit's 'updates available' icon in the plasma tray
Clicking it immediately shows the update KCModule. The module is in the icon app, so loading is lightning fast. An optimization we might do is to go directly from the get-updates transaction and into the KCM’s model. Otherwise, the KCM has to re-fetch the same list we showed in the notification.
By default, all updates are selected and the apply button is enabled. We’re currently discussing some UI tweaks to this that might make it look a bit like this:

A slightly tweaked updater UI
Icons are added, and the interaction is changed a little. Instead of everything being selected by default, thats all been replaced with a ‘apply all updates’ button. Its still one-click to update everything, but now its also one-click to close the dialog and not have systemsettings ask if you want to save your changes. Of course, if you really want to select everything and click Apply, its at most 3 clicks. Complaining against that will be a federal offense.
The other really important feature I finished was installing unsigned local files. Now I can install Cedega with only one click! There currently is a bug in the released PackageKit yum backend that prevents local files not existing in a repository from being installed, but there’s a patch I wrote getting pushed to git soon.
The last feature I added was reporting all errors with the tray icon. Now when your automatic updates fail, you’ll know why. Once we get the dbus interfaces implemented, we’ll be adding a little bit of code to the icon to only show messages for transactions that don’t have a dialog associated with them.
Oh yeah, and I start my spring semester at Akron tomorrow :)
KPackageKit 0.3.1 was recently released, so I figured now would be a good time to boast that I’m kinda an official KPackageKit contributor. Read the mailing list release notice :)
Hooray free software!
Currently, we’re working on changing the package details interface. Right now, clicking on a package makes an intrusive little group box appear at the bottom out of nowhere that takes up half the space. We’re planning on using the KExtendableDelegate that KGet uses to show a download’s details. After that, perhaps improving on the transaction dialog a little.
For my ASM and systems programming class, we occasionally write programs and need to upload them to the programmer board. Since my laptop only has USB ports, I was given a USB-to-Serial converter. In windows, there is device probing using AVR Studio that lets it find the device by itself. In linux, you only know which tty is the USB-to-Serial converter by looking at dmesg. Usually.
But this is the year 2008! Linux is a modern operating system! You should be able to do that probing through the command line, right?
Using HAL, you can easily find which device is the converter. It isn’t what AVR Studio does (sending magic packets) but it still works, and it doesn’t send any unwanted magic to my bluetooth radio or CDMA modem. I’ve written a small function for my zsh shell that automatically detects which USB tty is the serial converter and sets up the avrdude command as needed:
Of course, this script is written for that specific USB device, and tells avrdude to prepare for my ATMega16 (-p m16) on the STK500v2 programming board. YMMV.
Glovebox is still rolling around on my laptop. I managed to sit down today after a few weeks of on-and-off thinking of how to best solve my current problem: how to do widgets.
One idea was to hack the KDE bits out of Plasma and just stick it in there, but there’s a few problems with that:
Over time, I came to the conclusion that I won’t use plasma, but I’ll use it as a reference for some of the really great ideas it has.
Plasma’s main goal is for a slick looking desktop, be it for a PC, internet tablet, embedded device, or PDA. I’m sure someone from the plasma team would like to say that its great for my project, and I’d like to agree. I can’t really think of a good reason to not have it in, other than the fact that I don’t want kdelibs as a dependency. Perhaps I’m just bullish and falling for the Not-Invented-Here thinking.
If someone out there in kdeland can figure a way to jam plasma into Glovebox without requiring someone to install the whole kdelibs package, I’d like to hear that.
Anyways, I wrote my own little widget system. Its very simple for right now, as I don’t have any kind of theming in. Thats next I think.
Oh yeah, the obligatory screenshot:
Here you can see, what else, a clock. Its just a proof-of-concept clock though. I’m working on theming next.