orblazer / plasma-applet-resources-monitor

Plasmoid for monitoring CPU, memory, network traffic, GPUs and disks IO.
https://www.pling.com/p/2143899/
GNU General Public License v3.0
57 stars 6 forks source link

Switching to new system monitor app #6

Closed david-cortes closed 2 years ago

david-cortes commented 2 years ago

The ksysguard app that this widget uses has been deprecated. Would be helpful to move to the new system activity app so that it would launch something similar to Ctrl+Esc when clicking the widget.

orblazer commented 2 years ago

Hello, you have an source of that deprecation ?

david-cortes commented 2 years ago

If you go to the bugzilla page (https://bugs.kde.org/enter_bug.cgi), you'll notice that it says "ksysguard: | System monitoring tool [up to Plasma 5.21]" while the new one says "plasma-systemmonitor: | Plasma's system monitoring tool [Plasma 5.21+]". If you read the blog posts from KDE team members they have also mentioned multiple times that they want to replace ksysguard, and it's for example no longer being packaged in the latest KDE updates in debian.

orblazer commented 2 years ago

Ok, But for make that change i need to find how i can detect what plasma version is run (for retro compatibility).

And for that i don't know how i can to that..

david-cortes commented 2 years ago

One way to do it is this:

plasmashell --version

Outputs:

plasmashell 5.23.0

Another way would be to first try to launch plasma-systemmonitor, and if that fails, switch to ksysguard.

By the way, I think also the libraries used for getting the usage statics were replaced with new ones, not just the app that opens when clicking it.

orblazer commented 2 years ago

Yes i know how to get plasma version, but i just don't know how i can have this information in QML for that line : https://github.com/orblazer/plasma-applet-resources-monitor/blob/50d0023927ee5c87946c0c52b1c72ccd5a44ef14/package/contents/ui/main.qml#L357

thecmdrunner commented 2 years ago

System managers from other DEs come to mind, but installing them just for one applet will be impractical.

Maybe look over at the BTop and their implementation?