I always wanted to develop a plasmoid ever since kde4.0 but I wasn't getting any ideas which had enough driving force in them. Finally, about 2 days back, I got an idea which was the result of "scratch your own itch"!
Let me introduce the functionality of this plasmoid, which served as learning means to me.
Usually we developers keep building from sources quite often. Many a times we do multiple builds in the background. Its quite annoying to monitor the progress staring at the screen. Others start some other work only to realize that the build has completed long time back.
Some smart people invoke
echo -e '\a' immediately after make invocation to alert them.
However, wouldn't it be cool to have sneak-peak of the progress somewhere in the panel or as applet on the desktop ?
Especially, cmake has a wonderful method of saying the progress in percentile. So the visualization could really be made simple.
I used this as a use-case and developed a simple data-engine based plasmoid which is made up of following three components.
- The data-engine, which has a dbus-interface to add, remove make source and also set the progress for an already added make-source.
- The plasmoid, which at the moment is just a simple visualization, which displays the total progress of all builds.
- The makeinvoker, which is a simple stand-alone qt-core based program that wraps around make and parses the output of make for progress information. As soon as it finds the progress information, it relays this information to the data-engine using a dbus-call. Also the makeinvoker prints out both the stdout and stderr of the make process to its stdout and stderr.
Here is snapshot of the applet in work

Armed with Techbase, I could grasp the basics quite fast. I really love the architecture of plasma - its flexible, intuitive yet powerful :)
However the codebase of MakeStatus isn't as clean since I am newbie to plasmoids, data-engines and D-Bus. It will take some time to shape up the code.
Some more ideas that can be implemented are:
- Notification mechanism to indicate completion of make job (probably with error/warning clue as well if any)
- Ability to pause/resume make
- Display all make jobs with their progress in an extender when clicked.
As of now there is an issue bugging me and I am afraid there isn't an easy solution for it. The issue is, the "
coloring of the output text" by cmake based Makefiles don't work. I don't know how I can read stdout from a QProcess and also forward the same to parent process with coloring. Any help is appreciated :)
Also I somehow could not get data-engine d-bus connection to exist standalone as I wanted. I tried
QDBusConnection::connectToBus(QDBusConnection::SessionBus, "org.MakeStatusEngine")
but somehow that created the connection at
":1.125". I really don't know much dbus - so will resolve this later (or may be I'll get help soon ).
The dbus interface path currently lies in the connection "org.kde.plasma"
BTW, for non cmake based Makefiles there is currently no way to display the progress information. For these build systems, the progress is either 0% or 100% (yeah, its binary in nature ;) )
Thats all I had to say. Any feedback is appreciated. Infact I'd love to listen to many more ideas that can be incorporated into this plasmoid.