
Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net
Yes, Yet another systemmonitor plasmoid.
But still different from the others.
The only useful plasmoid systemmonitor i have found was Yasp. The problem with it was that it was not configurable enough.
So I came up with the idea, that everyone has its own imaginations of what belongs into a systemmonitor and what not. The birth of Yasp-scripted.
The name is similar to Yasp, because I use some modified code from that project.
The biggest advantage is that you can add things to the monitor or remove some, by just changing the script file and reparse it again...) No recompilation or something like that needed...
The scriptfile which comes with this applet is a scriptfile which fits exactly my system. You probably need to change it to fit your system (e.g. if you do not have a wireless lan card, you need to remove the wlan stuff from the script file).
You can send me your script, such that I can upload a whole bunch of scripts, the user could choose of later (maybe with a screenshot to see directly what the script does)
The scripts can be found in the directory yasp_scripts.
The 1st screenshot is systemmonitor_by_mtr.script, the 2nd screenshot is systemmonitor_by_patkoscsaba.script
and the 3rd screenshot is the script collection by duncan
(thx for the scripts).
If you want to align things, you should either use a monospace font, or use a t in the value.
If you are familiar with svg you maybe will create your own svg's for the bar-meter. Send them please to me to have a wider range of look and feel for the system monitor ;)
9 years ago
1.0.8a - wrong folder prefix ;)
1.0.8 - bug fixed when reparsing (the kde-plasma-handle was deleted, but we should not delete it)
1.0.7 - bug fixed if engine-sensors contains a colon
- Added script by joseph (thx for the script)
- New script by aldo (thx for the script)
1.0.6 - stack keyword added to plotter (thx Chris99 for the patch)
- Script by mtr added (thx for the script)
1.0.5 - fix crash on reparsing in kde-4.5.2 (with 4.5.2 reparsing works again, but 4.5.1 and 4.5.0 have a bug)
1.0.4
- Label preferredSize setting correctly + sizePolicy changed
1.0.3
- meter sizePolicy changed (works now better in KDE-4.5)
- bugfix for KDE-4.5 such that it does not crash on removal
1.0.2
- workaround for problems with KDE-4.5 and meters (min_height parameter added)
- added script by aldo to the package (italian labels)
(- known issue: yasp-scripted crashes on reparsing in kde-4.5. This will be fixed in a later release)
1.0.1 - bug fixed if yasp is closed while parsing the script
1.0: - Reparsing should be more stable
9 years ago
1.0.8a - wrong folder prefix ;)
1.0.8 - bug fixed when reparsing (the kde-plasma-handle was deleted, but we should not delete it)
1.0.7 - bug fixed if engine-sensors contains a colon
- Added script by joseph (thx for the script)
- New script by aldo (thx for the script)
1.0.6 - stack keyword added to plotter (thx Chris99 for the patch)
- Script by mtr added (thx for the script)
1.0.5 - fix crash on reparsing in kde-4.5.2 (with 4.5.2 reparsing works again, but 4.5.1 and 4.5.0 have a bug)
1.0.4
- Label preferredSize setting correctly + sizePolicy changed
1.0.3
- meter sizePolicy changed (works now better in KDE-4.5)
- bugfix for KDE-4.5 such that it does not crash on removal
1.0.2
- workaround for problems with KDE-4.5 and meters (min_height parameter added)
- added script by aldo to the package (italian labels)
(- known issue: yasp-scripted crashes on reparsing in kde-4.5. This will be fixed in a later release)
1.0.1 - bug fixed if yasp is closed while parsing the script
1.0: - Reparsing should be more stable
N7DR
5 years ago
[HN:build] cmake -DCMAKE_INSTALL_PREFIX=`kde4-config --localprefix` ../
as described in the INSTALL file produces:
----
-- The C compiler identification is GNU 4.7.2
-- The CXX compiler identification is GNU 4.7.2
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
CMake Error at /usr/share/cmake-2.8/Modules/FindKDE4.cmake:98 (MESSAGE):
ERROR: cmake/modules/FindKDE4Internal.cmake not found in
/home/n7dr/.kde/share/apps;/usr/share/kde4/apps
Call Stack (most recent call first):
CMakeLists.txt:6 (find_package)
-- Configuring incomplete, errors occurred!
[HN:build]
----
What do I need to do to fix this?
Report
bkant
7 years ago
Thanks as well to the users who provided their scripts. I have seen that Duncan had provided some external scripts where even conditonal statements are processed.
In my script I also have used a conditional statement but inside the main script. I wanted to have a decent notification about which additional internal drives, network drives (NAS) and which USB drives are currently connected and mounted. For internal drives I use this sensor line:
sensor name ="mount.win" type="program" cmd="ls -C /mnt/windows" interval="10000"
But in case of USB drives such a sensor would block the whole plasmoid from starting when no drive is mounted (the mount point would appear just as a link instead of a directory). So I tried this et voila, it works right out of the box:
sensor name ="mount.media" type="program" cmd="if test -d /mnt/media; then ls -C /mnt/media; fi" interval="10000"
This commandlet just looks if something is mounted and only when it is it actually fetches the names of the mounted drives. Simple but effective ...
Report
rnc
8 years ago
Report
Montblanc
8 years ago
Report
SicoBulo
8 years ago
Report
SicoBulo
8 years ago
Report
SicoBulo
8 years ago
I'm using Ubuntu 12.04 which provides KDE 4.8.3 as default.
Report
cialdo99
8 years ago
Report
SicoBulo
8 years ago
Report
SicoBulo
8 years ago
I'm using Ubuntu 12.04 which provides KDE 4.8.3 as default.
Report
bermudahonk
9 years ago
I'm using Debian unstable. Since KDE 4.5 I don't see any meters. They first show up when I resize the widget, but they only reach a sane size when i resize it insanely big. I know this has to do with changes made to kde. Is there any way to fix this in yasp? min_height is not helping.
Regards.
Report
yield65
9 years ago
My problem is with the system monitor sensors for download/upload speed. If I turn on the laptop with 1 or 2 of those cards disconnected then I just see a message that says it's waiting for one of those sensors and nothing else shows up.
Is there a way to bypass this so If YASP doesn't find the sensor it can keep working with a null or 0 value?
The other thing is that I changed the use of iwconfig to this:
cmd=%/usr/sbin/iwgetid wlan0 |awk -F ":" '{print $2}'%
So that it shows the ESSID of the currently connected network on opensuse (11.4) because it wasn't working with iwconfig and you can use it easier if you have more than one wireless interface.
Thnx and best regards.
Report
DuncanKDE
9 years ago
Report
yield65
9 years ago
sensor name="WLan1Ip" type="program" cmd=%/sbin/ifconfig wlan1 2>/dev/null | grep 'inet addr' | cut -d':' -f 2 | cut -d' ' -f1%
sensor name="Wlan1BitRate" type="program" cmd=%/usr/sbin/iwconfig wlan1 2>/dev/null | grep 'Bit' | cut -d'=' -f2 | cut -d' ' -f1-2%
sensor name="Wlan1Quality" type="program" cmd=%/usr/sbin/iwconfig wlan1 2>/dev/null | grep 'Link' | cut -d = -f2 | cut -d ' ' -f1%
sensor name="Wlan1Essid" type="program" cmd=%/usr/sbin/iwgetid wlan1 |awk -F ":" '{print $2}'%
And an interval of "3000". For the speed meter I finally used mrtg as daemon.
Report
bollo
9 years ago
Good system monitor though.
Report
finkandreas
9 years ago
If you place the plasmoid on your desktop and restart KDE, then it is KDE which will save the size.
However if you close the plasmoid, and add it again on the desktop, then yasp-scripted will have its minimum size by default.
So what exactly do you try to achieve? Over restarts the plasmoid size should not change (and it's KDE's job to ensure this)
Report
DuncanKDE
9 years ago
If placed in a panel larger than the minimum size, plasma will expand one plasmoid dimension (vertical in a horizontal panel, horizontal in a vertical panel) to size of the panel, the other will remain at plasmoid minimum.
If placed on the desktop, plasma will let you drag it larger than the minimum size, but not smaller.
You mention problems getting it to save its size, but saw what size you're talking about. If it's the minimum size, as I said, you control that yourself based on what you have the script setup to display, the font and font size you set, the height of the plotters, etc. The minimum width of the plasmoid is normally the required width of the widest item. As such, I control it here by setting a fixed-width font (this helps in getting things to line up well, too) and adding spaces or abbreviating labels until the longest line is the size I want. (If some lines can be variable, say due to numbers that can be 1-3 digits, I make sure another line is long enough to allow space for the three digits of the variable lines so the size doesn't keep changing on me every time it updates.) The minimum height is simply the set height of every displayed line, text or graphical, of the script.
If the size you're setting is larger than the minimum as explained above, then it's not really the plasmoid setting the size, but plasma itself. If there's a problem with that, it'd therefore be a plasma bug, not something the plasmoid itself controls.
And to answer your question, no, I'm not having such a problem, but if there were a plasma bug in that regard I'd not notice it because I configure the minimum size via the script and always use that, of course with the exception of the dimension that's always set by the panel size for plasmoids in a panel.
Report
bollo
9 years ago
I am trying to reduce the plasmoids minimum width.
I would like the monitor to be a slim coloumn placed at the edge of my screen.
I will try to get control over the mimimum width as suggested by adjusting the script.
I guess the statusbars that display the network transfer rates force the plasmoid to widen everytime it gets restarted.
I will post a how-to if I am successfull
Kudos for your work. Enjoy your weekend.
Report
siavash8
9 years ago
Report
DuncanKDE
9 years ago
That's because the scripts are all example scripts. They aren't really designed to be run as-is, unless you have exactly the same hardware setup as the person who authored the script. The idea is to customize them to your own hardware, partitions, etc.
There's typically two ways to get the data from your system into the script to be displayed -- two different types of "sensors" (the third listed in the README.syntax file is simply a math sensor that manipulates data already available from other sensors).
The first (second in the readme) type of sensor uses kde's existing plasma:dataengine, most frequently the systemmonitor engine. But what that engine exposes for use depends on what it can find in your system.
The second (first in the readme) type of sensor often requires a bit more work, but is *FAR* more flexible, because it simply takes the STDOUT of a (normally CLI mode command or command-pipe, making it available thru the sensor, for display via one of the text or graphic display elements yasp-scripted makes available for use by your yasp-script.
Thus, any output you can get to appear either on the command-line or via kde's systemmonitor engine, you can get yasp-scripted to display (obviously assuming generating that output doesn't require interactivity -- that it can be scripted, of course).
What this normally involves for lm_sensors output is running the command in the shell to see what the output you're looking for looks like, then piping that result to grep/sed/cut/awk/head/tail/etc to format it the way you need for the yasp-scripted sensor. (Typically, this will involve grepping a specific line of the output, then cutting/seding/grepping that down to just the number, either for formatted text/graphic display directly, or to be plugged into yasp-scripted's math functions to for instance turn KB into MB or GB, or to divide a value by the total possible to get a percentage for graphic.)
The shipped scripts do this already, but by definition, they measure statistics on the specific hardware that the author had. You can either modify the examples for your hardware, or you can use them as illustrations when creating your own.
In this way, yasp-scripted is very powerful, because it can be made to display whatever stats your system has available, *BUT*, it's also not a simple install and run plasmoid. It's designed for the power user, the user already familiar enough with his system and the command line, to know both what sort of information he wants, and how to use the traditional UNIX tools and shell scripting to get it in the form she wants. People who don't have the required skills will therefore find the this plasmoid pretty much worthless, because they won't know how to get it to display what they want it to display, not even to the point of modifying the existing scripts for their own system.
Report
siavash8
9 years ago
Report
tovarishStepanov
9 years ago
Report
tovarishStepanov
9 years ago
Report
Droopy159
9 years ago
Anybody else ??? What's wrong with kde 4.6.2 ???
Report
finkandreas
9 years ago
Report