Source i (link to git-repo or to original if based on someone elses unmodified work):

Add the source-code for this project on opencode.net

0
Become a Fan
7.3

Description:
A Do It Yourself textual system monitor, meant to be an entry point for you coding kde plasma applets in JavaScript.

By default it shows:
{cpu: %}{mem: MB}{wlan: KB/s d | KB/s u}{sda: KB/s r | KB/s w}

You most likely want to tweak the settings right away, like changing the text color to black if your theme is light or monitor eth0 rather than wlan0. This is, of course, done by editing the source code. The settings dialog shows you how to get there. The following page shows a number of examples of how to customize TextMon
http://maikbeckmann.github.com/plasma-textmon/hacking-textmon.html

To go beyond just tweaking TextMon and gain some insight, take a look at its home page
http://maikbeckmann.github.com/plasma-textmon/

--------------------

Additional Links
Github repo: http://github.com/MaikBeckmann/plasma-textmon/
Main source file: http://github.com/MaikBeckmann/plasma-textmon/blob/master/textmon/contents/code/main.js

The content of my main.js http://paste.kde.org/425714/ and its diff to main.js in master http://paste.kde.org/425726/. It monitors the same values as the default, but renders them in a shorter way:
%|MB|KB/s d KB/s u|KB/s r KB/s w

--------------------
feedback
@zeltak regarding mpd (updated 2012-02-25): Replace TextMon's main.js with this http://paste.kde.org/428840/ and see if and how it works for you. If you want to make a TextMdpMon copy the TextMon dir to some place (i.e. ~/Projects/TextMpdMon/), replace the main.js with the paste (if you haven't already) and metadata.desktop with http://paste.kde.org/428732/ . See http://maikbeckmann.github.com/plasma-textmon/prelude.html#sec-3 on how to install it.
Last changelog:

- 2012-02-19 So :: 1.0 -- Much better Javascript in main.js

- 2012-02-14 Di :: 0.11 -- Added links to docs and sources to settings dialog.

- 2012-02-09 Do :: 0.1 -- Initial upload.


Ratings & Comments

8 Comments

lionhater

Thanks for the gift, finally a sensible way to see cpu and memory usage instead of absurd graphs. If the temp reading (lm-sensors) can be added, this would make it the best plasmoid/applet/widget in the the whole cosmos? But adding mpd track would make it divine! I gather it's possible from above discussion, but can't figure out how.

martinv

Hi MaikB, thank you very much for this plasmoid. I really missed this in KDE. Hope they could make it an official kde plasmoid one day. Your KDE/js tutorial is very nice as well.

zeltak

wow thx for this great plasmoid i wonder if you cann add an option to pipe text from a command line command so i can show the current playing mpd song or other commands? thx z

MaikB

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.

zeltak

cool ive been away for a week or so..did you end up implementig this? is there a kde forum post? so excited about finally getting my mpd info in the kde bar thx Z.

zeltak

Whew sorry didnt see the above coments works reallt well..cant thank you enough for this..basiclly been waiting 3 years for this since kde 4.0 :) let me know if you need any other testing etc.. thx Z

jfebrer

I really liked it.

MaikB

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.

Pling
0 Affiliates
Details
license
version 1.0
updated
added
downloads 24h 0
mediaviews 24h 0
pageviews 24h 1

Other Plasma 4 Extensions:

Icon Tasks deb build
N00bun2
last update date: 14 years ago

Score 4.3

Prayer Times Plasmoid
riyad
last update date: 13 years ago

Score 5.2

KPrayertime4 Islamic Prayer Times
ahaq
last update date: 15 years ago

Score 4.4

Hostinfo
mgraesslin
last update date: 13 years ago

Score 4.7

Monitor QuadCore Russian
kuchumovn
last update date: 16 years ago

Score 5.0

blaKjaK
werevire
last update date: 15 years ago

Score 5.0