Building Plasma's System Monitor (Ctrl+Esc) By Itself
Feb 19, 2019
The “System Monitor” that ships with the plasma-workspace package is fairly useful, and is similar to KSysGuard. The System Monitor has a default shortcut (Ctrl+Esc) so you can quickly access it on any KDE Plasma installation. I usally have System Monitor sorted by “Relative Sort Time” so that I can quickly see the newest processes and if they’re the cause of what’s slowing down my PC.
The System Monitor does not come bundled with the CPU/RAM/Swap usage tab, or the ability to monitor other sensors, it’s just the process list.
Unfortunately, you’ll need to compile the entire plasma-workspace repo just to edit it, so lets try editing the plasma-workspace/systemmonitor/CMakeList.txt to only build the systemmonitor binary.
First add the minimum cmake, qt, and KDE Frameworks version definitions, which I’ve mentioned in other “build ___ by itself” blog posts.
Next we’re going to define a custom variable to target the minimum ksysguard version which is shipped under the “plasma” version.
Then add some more standard stuff from previous blog posts. We populate the KF5 components using the components mentioned in the target_link_libraries() further down.
Lastly, we import the SysGuard component using the PLASMA_MIN_VERSION.