dhabyx / plasma-simpleMonitor

plasma-simpleMonitor
GNU General Public License v3.0
51 stars 52 forks source link

Plasma 6 Support #66

Open zany130 opened 4 months ago

zany130 commented 4 months ago

Plasma 6 is out any chance of this getting ported?

Hwwipp commented 4 months ago

Used it for 7 years and would very much appreciate a Plasma 6 compatibility.

coogor commented 3 months ago

Used it for 7 years and would very much appreciate a Plasma 6 compatibility.

Same here

Iridias commented 3 months ago

I've done a quick-and-dirty port to Plasma 6 in my fork: https://github.com/Iridias/plasma-simpleMonitor It has some (IMO minor) issue, but basically works (at least on my machine ^^).

Maybe I'll open a PR - but my last PR with bugfixes for proper Plasma 5.27 support is still open to this day - so I guess there is no need to hurry.

coogor commented 3 months ago

I've done a quick-and-dirty port to Plasma 6 in my fork: https://github.com/Iridias/plasma-simpleMonitor It has some (IMO minor) issue, but basically works (at least on my machine ^^).

Thanks for that!

I tried to compile and install, which looked good so far: docb@X1E:~/buildservice/SimpleMonitor/plasma-simpleMonitor/build> cmake -DCMAKE_INSTALL_PREFIX=$(kf5-config --prefix) -DCMAKE_BUILD_TYPE=Release -DKDE_INSTALL_USE_QT_SYS_PATHS=ON ../ CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required): Compatibility with CMake < 3.5 will be removed from a future version of CMake.

Update the VERSION argument value or use a ... suffix to tell CMake that the project does not need compatibility with older versions.

-- Found X11: /usr/include -- Looking for XOpenDisplay in /usr/lib64/libX11.so;/usr/lib64/libXext.so -- Looking for XOpenDisplay in /usr/lib64/libX11.so;/usr/lib64/libXext.so - found -- Looking for gethostbyname -- Looking for gethostbyname - found -- Looking for connect -- Looking for connect - found -- Looking for remove -- Looking for remove - found -- Looking for shmat -- Looking for shmat - found CMake Deprecation Warning at translations/CMakeLists.txt:1 (CMAKE_MINIMUM_REQUIRED): Compatibility with CMake < 3.5 will be removed from a future version of CMake.

Update the VERSION argument value or use a ... suffix to tell CMake that the project does not need compatibility with older versions.

CMake Warning at /usr/lib64/cmake/KF5Package/KF5PackageMacros.cmake:46 (message): Providing metadata with .desktop files is deprecated. Please run "desktoptojson -i /home/docb/buildservice/SimpleMonitor/plasma-simpleMonitor/plasmoid/metadata.desktop" to convert the file to json and remove the desktop file Call Stack (most recent call first): /usr/lib64/cmake/KF5Plasma/KF5PlasmaMacros.cmake:36 (kpackage_install_package) CMakeLists.txt:13 (plasma_install_package)

CMake Warning at /usr/lib64/cmake/KF5CoreAddons/KF5CoreAddonsMacros.cmake:37 (message): kcoreaddons_desktop_to_json is deprecated and will be removed in KF6. Convert the desktop files to JSON in source using the desktoptojson executable Call Stack (most recent call first): /usr/lib64/cmake/KF5Package/KF5PackageMacros.cmake:49 (kcoreaddons_desktop_to_json) /usr/lib64/cmake/KF5Plasma/KF5PlasmaMacros.cmake:36 (kpackage_install_package) CMakeLists.txt:13 (plasma_install_package)

-- Configuring done (0.5s) -- Generating done (0.0s) -- Build files have been written to: /home/docb/buildservice/SimpleMonitor/plasma-simpleMonitor/build

docb@X1E:~/buildservice/SimpleMonitor/plasma-simpleMonitor/build> sudo make install [100%] Generating org.kde.simpleMonitor-plasmoids-metadata.json About to parse service type file "/usr/share/kservicetypes5/plasma-applet.desktop" Found property definition "X-Plasma-API" with type "QString" Found property definition "X-Plasma-RootPath" with type "QString" Found property definition "X-Plasma-MainScript" with type "QString" Found property definition "X-Plasma-ContainmentType" with type "QString" Found property definition "X-Plasma-DropMimeTypes" with type "QStringList" Found property definition "X-Plasma-DropUrlPatterns" with type "QStringList" Found property definition "X-Plasma-NotificationArea" with type "QString" Found property definition "X-Plasma-NotificationAreaCategory" with type "QString" Found property definition "X-Plasma-DBusActivationService" with type "QString" Found property definition "X-KDE-ParentApp" with type "QString" Found property definition "X-Plasma-Provides" with type "QStringList" Found property definition "X-Plasma-PreloadWeight" with type "int" Found property definition "X-Plasma-ConfigPlugins" with type "QStringList" Found property definition "X-Plasma-StandAloneApp" with type "bool" Found property definition "X-Plasma-RequiredExtensions" with type "QStringList" Found property definition "NoDisplay" with type "bool" The X-KDE-PluginInfo-Depends property is deprecated and will be removed in KF6 Unknown property type for key "X-Plasma-Requires-FileDialog" -> falling back to string Unknown property type for key "X-Plasma-Requires-LaunchApp" -> falling back to string Generated "/home/docb/buildservice/SimpleMonitor/plasma-simpleMonitor/build/org.kde.simpleMonitor-plasmoids-metadata.json" [100%] Built target org.kde.simpleMonitor-plasmoids-metadata-json Install the project... -- Install configuration: "Release" -- Installing: /usr/share/plasma/plasmoids/org.kde.simpleMonitor -- Installing: /usr/share/plasma/plasmoids/org.kde.simpleMonitor/contents -- Installing: /usr/share/plasma/plasmoids/org.kde.simpleMonitor/contents/code -- Installing: /usr/share/plasma/plasmoids/org.kde.simpleMonitor/contents/code/code.js -- Installing: /usr/share/plasma/plasmoids/org.kde.simpleMonitor/contents/config -- Installing: /usr/share/plasma/plasmoids/org.kde.simpleMonitor/contents/config/config.qml -- Installing: /usr/share/plasma/plasmoids/org.kde.simpleMonitor/contents/config/main.xml -- Installing: /usr/share/plasma/plasmoids/org.kde.simpleMonitor/contents/fonts -- Installing: /usr/share/plasma/plasmoids/org.kde.simpleMonitor/contents/fonts/Doppio_One -- Installing: /usr/share/plasma/plasmoids/org.kde.simpleMonitor/contents/fonts/Doppio_One/DoppioOne-Regular.ttf -- Installing: /usr/share/plasma/plasmoids/org.kde.simpleMonitor/contents/fonts/Doppio_One/OFL.txt -- Installing: /usr/share/plasma/plasmoids/org.kde.simpleMonitor/contents/fonts/Michroma -- Installing: /usr/share/plasma/plasmoids/org.kde.simpleMonitor/contents/fonts/Michroma/Michroma.ttf -- Installing: /usr/share/plasma/plasmoids/org.kde.simpleMonitor/contents/fonts/Michroma/OFL.txt -- Installing: /usr/share/plasma/plasmoids/org.kde.simpleMonitor/contents/fonts/Monda -- Installing: /usr/share/plasma/plasmoids/org.kde.simpleMonitor/contents/fonts/Monda/Monda-Bold.ttf -- Installing: /usr/share/plasma/plasmoids/org.kde.simpleMonitor/contents/fonts/Monda/Monda-Regular.ttf -- Installing: /usr/share/plasma/plasmoids/org.kde.simpleMonitor/contents/fonts/Monda/OFL.txt -- Installing: /usr/share/plasma/plasmoids/org.kde.simpleMonitor/contents/fonts/Play -- Installing: /usr/share/plasma/plasmoids/org.kde.simpleMonitor/contents/fonts/Play/OFL.txt -- Installing: /usr/share/plasma/plasmoids/org.kde.simpleMonitor/contents/fonts/Play/Play-Bold.ttf -- Installing: /usr/share/plasma/plasmoids/org.kde.simpleMonitor/contents/fonts/Play/Play-Regular.ttf -- Installing: /usr/share/plasma/plasmoids/org.kde.simpleMonitor/contents/images -- Installing: /usr/share/plasma/plasmoids/org.kde.simpleMonitor/contents/images/columnSkin-preview.png -- Installing: /usr/share/plasma/plasmoids/org.kde.simpleMonitor/contents/images/defaultSkin-preview.png -- Installing: /usr/share/plasma/plasmoids/org.kde.simpleMonitor/contents/images/distro-arch.svg -- Installing: /usr/share/plasma/plasmoids/org.kde.simpleMonitor/contents/images/distro-debian.svg -- Installing: /usr/share/plasma/plasmoids/org.kde.simpleMonitor/contents/images/distro-fedora.svg -- Installing: /usr/share/plasma/plasmoids/org.kde.simpleMonitor/contents/images/distro-kubuntu.svg -- Installing: /usr/share/plasma/plasmoids/org.kde.simpleMonitor/contents/images/distro-manjaro.svg -- Installing: /usr/share/plasma/plasmoids/org.kde.simpleMonitor/contents/images/distro-opensuse.svg -- Installing: /usr/share/plasma/plasmoids/org.kde.simpleMonitor/contents/images/distro-slackware.svg -- Installing: /usr/share/plasma/plasmoids/org.kde.simpleMonitor/contents/images/distro-tux.svg -- Installing: /usr/share/plasma/plasmoids/org.kde.simpleMonitor/contents/images/distro-ubuntu.svg -- Installing: /usr/share/plasma/plasmoids/org.kde.simpleMonitor/contents/images/minimalisticSkin-preview.png -- Installing: /usr/share/plasma/plasmoids/org.kde.simpleMonitor/contents/images/resize.svg -- Installing: /usr/share/plasma/plasmoids/org.kde.simpleMonitor/contents/images/simpleMonitor-skins.svg -- Installing: /usr/share/plasma/plasmoids/org.kde.simpleMonitor/contents/images/simpleMonitor.svg -- Installing: /usr/share/plasma/plasmoids/org.kde.simpleMonitor/contents/images/simpleMonitor_icon.svg -- Installing: /usr/share/plasma/plasmoids/org.kde.simpleMonitor/contents/ui -- Installing: /usr/share/plasma/plasmoids/org.kde.simpleMonitor/contents/ui/components -- Installing: /usr/share/plasma/plasmoids/org.kde.simpleMonitor/contents/ui/components/LogoImage.qml -- Installing: /usr/share/plasma/plasmoids/org.kde.simpleMonitor/contents/ui/config -- Installing: /usr/share/plasma/plasmoids/org.kde.simpleMonitor/contents/ui/config/ConfigGeneral.qml -- Installing: /usr/share/plasma/plasmoids/org.kde.simpleMonitor/contents/ui/config/ConfigMisc.qml -- Installing: /usr/share/plasma/plasmoids/org.kde.simpleMonitor/contents/ui/config/ConfigSkins.qml -- Installing: /usr/share/plasma/plasmoids/org.kde.simpleMonitor/contents/ui/main.qml -- Installing: /usr/share/plasma/plasmoids/org.kde.simpleMonitor/contents/ui/monitorWidgets -- Installing: /usr/share/plasma/plasmoids/org.kde.simpleMonitor/contents/ui/monitorWidgets/AverageCPU.qml -- Installing: /usr/share/plasma/plasmoids/org.kde.simpleMonitor/contents/ui/monitorWidgets/CoreTempList.qml -- Installing: /usr/share/plasma/plasmoids/org.kde.simpleMonitor/contents/ui/monitorWidgets/CpuWidget.qml -- Installing: /usr/share/plasma/plasmoids/org.kde.simpleMonitor/contents/ui/monitorWidgets/DatePicker.qml -- Installing: /usr/share/plasma/plasmoids/org.kde.simpleMonitor/contents/ui/monitorWidgets/GpuTempList.qml -- Installing: /usr/share/plasma/plasmoids/org.kde.simpleMonitor/contents/ui/monitorWidgets/HighlightCpu.qml -- Installing: /usr/share/plasma/plasmoids/org.kde.simpleMonitor/contents/ui/monitorWidgets/MemArea.qml -- Installing: /usr/share/plasma/plasmoids/org.kde.simpleMonitor/contents/ui/monitorWidgets/OsInfoItem.qml -- Installing: /usr/share/plasma/plasmoids/org.kde.simpleMonitor/contents/ui/monitorWidgets/TimePicker.qml -- Installing: /usr/share/plasma/plasmoids/org.kde.simpleMonitor/contents/ui/monitorWidgets/UptimePicker.qml -- Installing: /usr/share/plasma/plasmoids/org.kde.simpleMonitor/contents/ui/skins -- Installing: /usr/share/plasma/plasmoids/org.kde.simpleMonitor/contents/ui/skins/BaseSkin.qml -- Installing: /usr/share/plasma/plasmoids/org.kde.simpleMonitor/contents/ui/skins/ColumnSkin.qml -- Installing: /usr/share/plasma/plasmoids/org.kde.simpleMonitor/contents/ui/skins/DefaultSkin.qml -- Installing: /usr/share/plasma/plasmoids/org.kde.simpleMonitor/contents/ui/skins/MinimalisticSkin.qml -- Installing: /usr/share/plasma/plasmoids/org.kde.simpleMonitor/metadata.desktop -- Installing: /usr/share/plasma/plasmoids/org.kde.simpleMonitor/metadata.json -- Installing: /usr/share/metainfo/org.kde.simpleMonitor.appdata.xml -- Installing: /usr/share/kservices5/plasma-applet-org.kde.simpleMonitor.desktop -- Installing: /usr/share/locale/es_ES/es_ES.mo -- Installing: /usr/share/locale/eu_ES/eu_ES.mo -- Installing: /usr/share/locale/pl/LC_MESSAGES/plasma_applet_org.kde.simpleMonitor.mo -- Installing: /usr/share/locale/ru/LC_MESSAGES/plasma_applet_org.kde.simpleMonitor.mo -- Installing: /usr/share/locale/tr/LC_MESSAGES/plasma_applet_org.kde.simpleMonitor.mo -- Installing: /usr/share/locale/zh_CN/LC_MESSAGES/plasma_applet_org.kde.simpleMonitor.mo

However, when I want to install it it does not show up in the list of apps. I'm using openSUSE Tumbleweed

Iridias commented 3 months ago

Providing metadata with .desktop files is deprecated. Please run "desktoptojson -i /home/docb/buildservice/SimpleMonitor/plasma-simpleMonitor/plasmoid/metadata.desktop" to convert the file to json and remove the desktop file

You sure, you're on the right branch? The changes are in "main" not "master".

coogor commented 3 months ago

Providing metadata with .desktop files is deprecated. Please run "desktoptojson -i /home/docb/buildservice/SimpleMonitor/plasma-simpleMonitor/plasmoid/metadata.desktop" to convert the file to json and remove the desktop file

You sure, you're on the right branch? The changes are in "main" not "master".

Well, I followed the instructions...

coogor commented 2 months ago

You sure, you're on the right branch? The changes are in "main" not "master".

Checkout with --branch did not work, downloaded source manually, compiled, and result looks good! Thank you for your update!

Hwwipp commented 2 months ago

I downloaded the source and used cmake. As far as I can tell everything worked fine. When I tried to put the simple monitor to my desktop, plasma complained about incompatibility with V6. It seems the plasma shell considers it a V5 plasmoid.

I am on Arch and Arch does not provide a plasma-framework-devel package. On Arch I only find a plasma-framework5, which is installed on my system.

Any advice?

lclol commented 2 months ago

Hi Iridias, and first, thanks for that port :) I'm happy to get simple monitor back again :)

Running under plasma 6.0.4 on Opensuse Tumbleweed, I've followed the "plasmapkg2 -i plasma-simpleMonitor-0.6.plasmoid" way and had no problem with the installation.

The first problem I got running the widget was an error in the widget about QtQuick.Controls version 1 missing. I've solved it by forcing the import QtQuick.controls to an upper version in /contents/ui/main.qml (works with these : 2.12 or 6.0). I can put a PR on your repo if you like.

Now the widgets works but has a few issues : the misc. tab in config menu doesn't work, and CPU temperatures only show for the first 4 cores on mu 8-core system. That might be linked, because as far as I remember, the CPU config is precisely in the misc screen ;)

Thanks again !

Iridias commented 2 months ago

CPU temperatures only show for the first 4 cores on mu 8-core system

That might also be due to the way, the temperatures are fetched now - using the "brute force" method by parsing sensors ...not quite elegant, but at least it works

the misc. tab in config menu doesn't work

right. I fixed that in the last commit