Hello, planet!

So, uh, hi there. I’m new to the planet.

To get things started, I’m Trever, a 20 year old CS student from the good ‘ole US of A, which may or may not be true depending on your opinion of the united states. Your call. Anyways, I’ve been hacking on KDE on and off since 2007ish. The most I did was make a few patches for Amarok and just go bug hunting. Oh, and coding a lot of PHP. Apparently I’ve grown out of my PHP phase and moved on to bigger things with C++ and python. I’m one of the two people (the other one is Daniel) who work on KPackageKit, the KDE frontend to PackageKit. KPackageKit was the big reason I started hacking on KDE for real. It has also been rumored that I help work on the KDE bits for PolicyKit in fits (this rumor was started by me).

Cool, now that bit is out of the way. Now for something completely different, and really neat. I call it “Bubblemon”:

Bubblemon showing roughly 50% CPU usage

Bubblemon showing roughly 50% CPU usage

You can find it in playground/base/plasma/applets/bubblemon.

I’ve had the CPU plotters provided by the system-monitor plasmoid bundle, but I thought they were too boring, hard to see current usage at a glance, and I couldn’t really shrink them small enough. I think bubblemon addresses those shortcomings. Bubblemon is a glass sphere that fills up with some kind of goop depending on what it is monitoring. The cool thing is, the more full it is, the more it boils. Yes thats right, this is a cool animated plasmoid. It is guaranteed to wow your friends[1]. The hotter it gets, the faster it boils with more bubbles.

In addition to monitoring your CPU usage, you can also monitor your memory usage. Soon, I’ll be adding temperature monitoring once I rework some of the internals (its all about plugins, man).

While writing this, I found a few possible bugs in plasma. I say possible, because I’ve been known to be an idiot sometimes. For instance, there’s this:

Bubblemon chilling in the plasma panel

Bubblemon chilling in the plasma panel

Putting it in the panel doesn’t seem to respect the plasmoid’s aspect ratio. I’m not entirely sure why this might be happening, as the battery plasmoid doesn’t have this problem, and I used it as reference for most of the code. I also haven’t updated my kdelibs with kdesvn-build since a month ago, so I’m not sure if it is fixed or not. Another issue I found was the lack of a plasma API to handle my animation. Bubblemon is forced to create its own QTimer, which is then connected to a slot that moves the bubbles and calls for a repaint every 40 ms, giving a 25fps animation. This gives plasma an ungodly number of wakeups per second. Not entirely sure if that can be helped though. However the methods that actually move and draw the bubbles take up 50% of my CPU (10 of which is system), which is unacceptable even on this dual core 2Ghz thinkpad.

The good news though, is that when my laptop goes on battery power, Applet::shouldConserveResources() returns true and bubbles are no longer bothered with, dropping CPU usage down to about 3%. If there’s any C++ gurus around who can figure out what is being such a resource hog, you’d be doing something pretty awesome for me. I’ve ran it through valgrind a few times, and it seems like most of the work is spent blending textures together in Qt. Later this week I might try 4.5 to see if that fixes anything.

1 Not an actual guarantee.

10 Responses to “Hello, planet!”

  1. Will Stephenson

    Heh, very World of Goo!


  2. I kinda like it the way who plasma managed to transform your thing into a eggmoon on the panel ;D


  3. It would probably be worth considering dropping that framerate. I find UI animations generally don’t need anything above 5fps.


  4. pretty cool oranges here. LIke bubblemon too, but it should’ve been orange. Can’t help you with the cpu usage issues, but then again, if the cpu usage was 3%, there would be no bubbles to show, so it’s good the applet keeps itself busy, right?


  5. Nice!! I m loving it!!
    But the temperature sensors don’t seem to work! :( !
    I love the buble!!


  6. @jospoortvliet Since it uses SVG, making it an orange is easy :)

    @Paul I tried dropping it to update every 75ms, and it looked very choppy.

    @DrIDK Yeah, I don’t have them working yet. I started to put them in then realized, “Hey, there’s a much better way to do this than a static list”.


  7. Hello Trever! Welcome to the planet. Very nice projects you’re working on :)
    I’m using jaunty already… was a bit ‘jealous’ regarding fedora having kpackagekit before kubuntu :D


  8. Hey!
    It’s soooo cute! But would you be very upset if I came in and made it even more CUTE. I’m a graphic artist @ kdegames. Just say “Yes” and it all will “just happen”, like magic ;)


  9. Edgardo

    It’s no longer in http://websvn.kde.org/trunk/playground/base/plasma/applets/bubblemon.
    ¿Where can I get it?

    Thanks..


Leave a Reply