Image 01
profile-image

finkandreas

Andreas Fink
Groupware
Plasma 4 Widgets
test
Yasp-Scripted (Systemmonitor) v1.0.8a

Plasma 4 Widgets 301 comments

Score 82.1%
Feb 25 2011
Hello,
probably I wrote it in some comment before, but I'm not using KDE myself at the moment, so it always take a bit longer for the requested updates, but I still work on yasp, if people see bugs, or have feature requests.

some notes from my side to your requests:

- icons for meters, charts and text
meters and charts could get an extra icon, but I do not see why text should get one. Because text with an icon would be the same as value with an icon and key=" ". Just as you did with the top in your script. So you should clarify why text should have an icon...

- I don't know how it is done, but icons should be cached in RAM, so the file is not re-read every time the "value" containing an icon refreshes
The icon is only loaded once during the parsing. Then I have a QPixmap from that icon (probably a shared one, with other instances of KDE). So I do not know, why you think that the icon is reread every time from disk...
Maybe KDE changes the QPixmap (because it is shared) but that has nothing to do with yasp


- it still uses pretty much resources if charts are updated faster than 4 secs.
Yasp is simply using a Plasma::SignalPlotter from the KDE package, so if you want to have it optimized the plotter in KDE itself should be optimized (but that's the job of the KDe guys). But I doubt that the guys from KDE implemented it in a really bad way, so there is probably not much room for optimizations ;)

- possibility to add value to Title, so I could add, for example, distribution name in the title.
- icons for titles
Both things could be done, if I feel like codin' again on yasp scripted...

- I couldn't figure out how to make a font BOLD, it does not accept QFont parameters for bold. Font definition should be like QFont is: QFont ( const QString & family, int pointSize = -1, int weight = -1, bool italic = false )
Nope I'm not going to use this constructor but rather QFont::fromString(), because you can hide everything in one string. For your example you should use sth like that:
Times,12,-1,5,50,0,0,0,0,0
Here the Times is the font family, 12 is the pointSize and 50 stands for a normal font. If you increase it it will become bolder, decrease it and it will be the opposite (values between 0 and 99, as can be seen in the Qt documentation).
As you can see there are even more parameters. If you want to find the line for a specific font configuration write a small program which creates your font, and then use QFont::toString() to see the line you should use... If you don't know how to write the program i could send you the small program by mail.

- you could add "height" parameter for "Meters", too
I have to try whether that works with Plasma::Meter (again something I borrowed from KDE without any adaption)
- Dec 29 2009
Another thing you could try: make the plasmoid wider, than the '8' should appear...
If you see the 805 then completely the problem is that svg for the meter defines a too small field, so you can change the svg itself and define a bigger field.
But the simplest is to resize the plasmoid that it becomes wider. - Dec 03 2009
That's strange. Could you post the sensors and values you're using for getting this line? - Dec 02 2009
sounds interesting, but I won't implement it, since the system behind yasp-scripted was not thought for that, and therefore it requires a bit more work to do sth like that...
If you or anyone else needs this feature feel free to implement it. - Nov 21 2009
Ok, finally I found some time to implement this. So have a look at version 0.99, there are some new features.
Shortly said for the keyword value you can add "icon_click", "key_click" and "value_click"
For the keyword "text" you can add "click"
And a completely new keyword was introduced, namely "icons". The icons keyword adds a horizontal stack of icons where each icon can have it's own click event (look in README.syntax)
- Nov 19 2009
Ok, I've looked once again in my source code and voila, I've seen that the parsing itself happens in a seperate thread, whereas the execution happens in the main thread (which of course is a stupid idea, and will probably be changed)
And finally I understood why plasma needs to be single threaded, since paintings can only happen in the main thread in qt, and thus all plasmoids need to run in the main thread...

But unlike duncan has mentioned that the waiting should be very careful, the waiting can be very long since it happens in a second thread and doesn't bother the main thread... So increasing the number as mentioned in the workaround above should work... - Nov 10 2009
Sorry, I do not have much time for fixing the problem, but actually a sleep sensor should work, since the sensor parsing is done in another thread, i.e. it shouldn't freeze the main thread. Unfortunately I changed from KDE to openbox, such that testing is not possible atm... So I really do not know, why a sleep sensor is blocking plasma completely. And why plasma is single threaded I do not understand either, since this would mean that any plasmoid can block your whole desktop, which would be quite stupid. - Nov 06 2009
Thanks for the scripts. I've packaged them now with the main tarball... - Oct 29 2009
There is nothing impossible, but the question is what you want to do with that...
D'you want to start some program, or do you want get more information when clicking on the icon (like a small box appearing with some information) - Oct 07 2009
Ok, then I guess I know what the problem is:
The plasmoid tries to first setup all sensors, and if one sensor could not be setup it stops the processing and gives a message like: This sensor could not be...
The problem is, that the plasma-sensors (type="engine") are asynchronious, i.e. the do not give directly a response but more or less when they have the data.
Yasp-scripted is waiting some time until it gets all data, but sometimes your pc is just too busy to get the data in the period yasp is waiting for and then you get this message.
You could try to replace this line:
scriptparser.cpp:489 while ( m_pYasp->DependenciesFulfilled(Dependencies) == false && nCount++ < 200 )
by the line
while ( m_pYasp->DependenciesFulfilled(Dependencies) == false && nCount++ < 500 )

this lets yasp waiting even longer for the sensors to be registered. I hope this fixes the problem (it fails on startup because kde is loading a lot of stuff then, and it takes some time to settle down, but for me 200 was always enough) - Oct 05 2009
Does this only happen when you logout and login again, or does this also happen on the first startup?
- Oct 05 2009
Thanks for the PKGBUILD. I linked to it in the download section, such that everyone can see that there exists an ARCH package. - Sep 21 2009
And thx for the report. I'm wondering why you're the only one who complained about that ;)
- Sep 17 2009
okay, fixed in 0.9b...
Hopefully I did not introduce new bugs ;) - Sep 17 2009
Hm, I forgot to set an expand tabs flag in the source code. It should work now with 0.9a...
But the next time you could be more precise with "it does not work". - Sep 17 2009
icon=":/All/icons/ram.png" is definetly not correct, since it means: Search in the compiled in icons in the hierarchy /All/icons/ram.png. But since there are not compiled in icons this is just wrong. Maybe KDE still searched for it on the harddisk and found it somehow. I just changed the Iconloader routine, which seems to not support this bad style. Just use the full path, or give only the icon name, i.e. icon="/usr/share/icons/kde4/All/icons/ram.png" or icon="ram" then KDE probably will find it too.

iconsize=10 is wrong. Excerpt from README.syntax:
# A key-value pair has the syntax: key="value"
# See below which keys are accepted for each keyword section.
# The value itself must be enclosed in some tags, whereas the tag itself can be chosen freely,
# i.e. this examples result in the same key-value pair: abc="xyz", abc=%xyz%, abc=NxyzN

You see, iconsize=10 is not and will not be supported
- Sep 16 2009
Hi,
ok, once for you:
value key="key1\nkey2" use="USE1" use="USE2" format="$1\n$1\t$2" icon="kopete" iconsize="32"

This will give you a line where on the left is first the kopete icon with a size of 32x32, then right to the icon are two lines:
key1
key2
and right to these two lines is
$1
$1(here is the tabulator)$2


Hm, I hope you got it ;)
The icons can be found in /usr/share/icons/YOURTHEME (usually oxygen)
or just give a full path.
- Sep 16 2009
Ok the new version is hopefully having everything you need to customize it even more. I hope that it works, because I cannot test it correctly since I'm using now openbox and can only check for compilation and basic usage... - Sep 15 2009
sensor name="Core1Temp" type="program" cmd=%sensors | grep temp1 | xargs | sed -e "s/temp1: \(+[0-9]*\).*/\1/"%

does this work?? - Sep 15 2009
The syntax readme is in fact not very nice, but I do not see how HTML or PDF would help (at least not with a lot of effort in formatting and such stuff).
I think the best would be to do it in LaTex but that takes some time and I'm not sure if I really will do it (probably no).
If you or someone else wants to start something like this, I would love to see a nicer readme.

To your 2 requests:
1) Just the icon size should be no problem. A problem would be if you want to have one icon over 2 columns, since this would not be possible

2) Yes I can implement that (not a big thing), but there are so many other things you could set, like grid color, vertical grid line count, horizontal grid line cound, a grid at all. Implementing them all is of course no big deal, but I thought that this would be too much of customization ;)

So I'll implement a background color and icon size the next few days (probably that weekend) - Sep 09 2009
Unfortunately this is not possible, and actually I do not plan to integrate it in the near future, since it means a lot of code rewrite...
Maybe you can align with the tabulator, but I'm not sure if this really works, just something which could work... - Sep 04 2009
Yeah the word path, is maybe a bit misleading. I should clarify that this should be the directory+filename (I'm just used to call a directory+filename the path of a file, because it's called this way in Qt)
- Sep 04 2009
Hmm, maybe you got it wrong, but .yasp.script has to be a file, not a directory ;)
So copy the file systemmonitor.script to the file .yasp.script or change in the preferences dialog the path to /path/to/systemmonitor.script (and by path, I mean the path inclusively the filename...)
- Sep 04 2009
Hopefully the new version works for you...
At least it works for me (I'm using utf-8, as my system encoding) - Aug 31 2009
I've added the new keyword.
A sample implementation can be found in the systemmonitor.script inside the tarball... - Aug 29 2009
Hm, there is no clean code for this...
There need to be a 'text' section or something like this, which stretches over the whole width (like the bar and the plotter)
maybe I'll implement it the next days, since it does not make that much work ;)
- Aug 28 2009
Thx a lot...
It's nice to see that people find this plasmoid useful although you need to put some effort to get it working like you want it to work ;) - Aug 23 2009
Yeah I thought about implementing that, but I'm not yet sure about the syntax to choose ;)
Right now, you will get 2 digits after the decimal point. If you want to change this behaviour you actually need to recompile the sources. Here the line you need to change:
yasp-scripted.cpp:308
sAfter = QString("%1").arg(m_Sensors[sSensor].toDouble(), 0, 'f', 2);
to
sAfter = QString("%1").arg(m_Sensors[sSensor].toDouble(), 0, 'f', 1);

for only one significant digit after the decimal point.

Here the four lines for the Home partition:
sensor name="HomeUsed" type="engine" cmd="systemmonitor:partitions/home/usedspace:value" math="double $0 256 / 1024 /"
sensor name="HomeTotal" use="HomeUsed" type="engine" cmd="systemmonitor:partitions/home/freespace:value" math="double $0 256 / 1024 / $1 +"
sensor name="HomeFill" type="engine" cmd="systemmonitor:partitions/home/filllevel:value"
meter use="HomeUsed" use="HomeTotal" use="HomeFill" label:0="home" label:1="$1 Gb / $2 Gb" alignment:1="right" min="0" max="100" value="$3"

Two sideremarks here:
- You need to take double for the calculations (if you want to have higher precision, int would work too, but would give you imprecise results)
- You need the HomeFill sensor, since a meter can only take integer values for the min, max and value thing.
- The precision will be the same for ALL double values. There is (at the moment) no possibility to change it per value

Hopefully this was helpful for you... - Aug 16 2009
Fixed in 0.6 - Aug 15 2009
Okay found the error in the source code, but need some time to fix it. Maybe tomorrow ;)
However I am wondering why it worked before... - Aug 14 2009
So if the line is commented everything works fine, but as soon as you uncomment it, it fails with broken dependency?
Could you upload your whole script, since not used sensors should be possible (even if it is not very useful to have unused sensors :P)
- Aug 14 2009
Hopefully fixed in 0.5 - Aug 14 2009
Hopefully fixed in 0.5... - Aug 14 2009
I will have a look on that problem next week... - Aug 11 2009
Happend also the first time to me, and I think it is quite stupid, that you neither can edit nor delete your own comments... - Aug 10 2009
Probably you do not have a wireless lan card, or the name of the wireless card is not wlan0 but something else?
You have to adapt the script to your system, since the available script is just fitting to my system and may be not what you want to monitor (for example the whole 'portage' section will be uninteresting for you, cause this is just Gentoo specific stuff)

So just adapt the script to what you want to monitor, and replace wlan0 and eth0 with your networkcards. - Aug 10 2009
Could you try it with this small scriptfile:

sensor name="test" type="program" cmd="echo 123"
value key="abc" use="test"

Just save these two lines in a file, and set this file as your script. This should print you 'abc' and '123' in one line. - Aug 09 2009
Hm, strange...
Could you check, what your script path is: Right click on the applet -> "Yasp Scripted Settings" -> "Script Path".
Make sure that it really points to an existing file... - Aug 09 2009
I can't delete the comments (or I am too stupid to find it).
However to solve your problem:
You're missing the package kdelibs5-dev.
Check this site if you have even more compilation problems: http://ubuntuforums.org/showthread.php?t=718183 - Aug 09 2009
fixed since version 0.4 - Aug 09 2009
Do you also use Kde 4.3?
I'm going to install the next days kde 4.3 and can debug what really happens there.
In the meantime everyone with kde4.3 should disable the partition section. - Aug 05 2009
When does it crash? On startup or on exit/reparsing?
If it crashes on exit or reparsing, then i have also this error (which actually is a failure of plasma and not of this program, since it crashes on calling a plasma function)

If it is on startup check please if everything went fine on installing, especially if the file $HOME/.yasp.script exists. Did you maybe changed the yasp.script file?

Try to run it in the plasmoidviewer (i.e 'plasmoidviewer -c desktop yasp_scripted')
- Aug 01 2009
Smooth Tasks

Plasma 4 Widgets 842 comments

by panzi
Score 86.9%
Nov 05 2010
Yeah thanks, thats me, who did that fork, and by the way it's working already. It just needs to accepted... - Aug 22 2009
I like this plasmoid quite a lot, the only annoying thing for me: There is no possibility to choos "No Preview".
I actually would like to have only the window title when hovering over an item, and that if possible without any animation and directly. Pretty much what the "Expand Tasks" is doing but inside the taskbar itself, but above it (where the preview is at the moment)
Do you think you will implement this, or should I start to get into the source code and hack it for me ;) - Aug 17 2009
Kdenlive

Video Apps 77 comments

by jbm
Score 86.0%
Apr 07 2013
Ok, the english version does not make any sense at all, so here a translation which is not generated by a translator ;)
------------------------------------
Hello,
if i start the program in openSUSE 11.0/KDE 3.5 from the start menu, I only get a cursor which jumps up and down, but the program never starts.
If i start the program from the console, I get the wizzard.
There i could choose DV 720x576, but after this i got the error message, that my ffmpeg is not compatible (not installed).
So what can be the error (my KDE install, or a bug in this software?)
------------------------------------
Translation finished...
I'm sorry but i cannot help you, but maybe now, someone understands what your problem is...
(für dich auch nochmal auf deutsch, da du anscheinend probleme mit dem englischen hast: Ich kann dir leider nicht helfen, aber ich hab mal deinen text übersetzt, sodass das englische ungefähr dem deutschen text entspricht.)

- Jul 12 2009
Blogilo

Utilities
by golnaz

Score 63.3%
Sep 08 2009