Image 01
profile-image

MaikB

Maik Beckmann Aachen, Germany
Plasma 4 Widgets

TextMon

Plasma 4 Widgets Feb 19 2012
Score 63%
63 Likes
37 Dislikes
TextMon

Plasma 4 Widgets 8 comments

by MaikB
Score 63%
63 Likes
37 Dislikes
Feb 19 2012
Good thinking there :D

I've looked at what Awesome (the WM) widget's do. They use Lua's io.popen which allows to monitor the stdout of a program asynchronously.

From what I can tell there is no direct equivalent in Plasma's JavaScript API. Instead you're supposed to use the "executable" date engine. It starts a process, waits for it to finish and sends you the stdout,stderr etc. to the slot it was connected it to. You can't monitor a long running process with it, since it won't call the slot until the program has finished execution.

In case of "mpd" this isn't an issue though. It's a daemon that can be queried by short running programs, foremost "mpc". In other cases there is always the workaround to provide a shell script that starts, reads some data and exits.

Since I can't edit comments to fix errors, I'll add the paste link to some code in the description above. I think of a better method to share such snippets later. Maybe a thread on forum.kde.org is a good idea.
- Feb 24 2012
The code of version 0.1 worked well, but looked horrible. That became very clear when I wrote the documentation on how to change/tweak it. Changes all over the place were needed and then this giant "if else if" chain.. *shiver*.

As of version 1.0 I'm really happy with the code and feel confident enough to say: Thank you :D

The real work however was and will be the documentation. If you have any questions or suggestions, feel free to ask them here. - Feb 19 2012
ZeroNome Dark

Plasma Color Schemes

Score 61%
61 Likes
39 Dislikes
Mar 10 2012
Score 52%
52 Likes
48 Dislikes
Feb 23 2012
Yotsuba / 4chan Theme

Kopete Styles

Score 56%
56 Likes
44 Dislikes
Feb 23 2012
Score 78%
78 Likes
22 Dislikes
Feb 23 2012
gmail-plasmoid

Plasma 4 Widgets

Score 91%
91 Likes
9 Dislikes
Feb 14 2012
Kaire

Wallpaper Other

by mcder
Score 58%
58 Likes
42 Dislikes
Oct 12 2011
Krayscale (Plasma tray icons)

Individual Icons/-sets

Score 72%
72 Likes
28 Dislikes
Sep 29 2011
Androbit

Plasma Themes

Score 84%
84 Likes
16 Dislikes
Aug 11 2011
Oxyfied

Yakuake Skins

by lxg
Score 62%
62 Likes
38 Dislikes
Aug 02 2011
Linux on Wall (Blue)

Wallpaper Other

by Fri13
Score 67%
67 Likes
33 Dislikes
May 03 2011