koldbyte / termoid

Terminal in a Plasmoid
https://store.kde.org/p/1169451/
46 stars 6 forks source link

Plasma 6 support #26

Open acarasimon96 opened 10 months ago

acarasimon96 commented 10 months ago

With the release of Plasma 6 approaching (currently scheduled for February 28th, 2024) and Qt 6 support in QTermWidget currently being worked on, it would be really nice to make this project compatible with the new version.

Due to a bug in Plasma where all clock widgets are running up to about a second late, I use Termoid to display an instance of tty-clock in order to watch each second and minute change precisely without having to open a new terminal window. It would be great if this gets done before or around the time Plasma 6 releases, since my use case depends on this workflow.

ctrlcctrlv commented 6 months ago

It wasn't image

ctrlcctrlv commented 6 months ago

In trying to upgrade it I haven't got much of anywhere and still have the same error message, here's my diff so far should someone else find it useful as I'm likely to just give up here as I was only using it to display htop and if the System Monitor plasmoid is better now no longer need it.

diff --git a/build b/build
index 03fb8f3..4d390c2 100755
--- a/build
+++ b/build
@@ -1,9 +1,9 @@
 #!/bin/bash
-# Version 4
+# Version 5

-plasmoidName=$(kreadconfig5 --file="$PWD/package/metadata.desktop" --group="Desktop Entry" --key="X-KDE-PluginInfo-Name")
+plasmoidName=com.koldbyte.kde.termoid
 plasmoidName="${plasmoidName##*.}" # Strip namespace (Eg: "org.kde.plasma.")
-plasmoidVersion=$(kreadconfig5 --file="$PWD/package/metadata.desktop" --group="Desktop Entry" --key="X-KDE-PluginInfo-Version")
+plasmoidVersion=0.6
 rm ${plasmoidName}-v*.plasmoid
 cd package
 filename=${plasmoidName}-v${plasmoidVersion}.plasmoid
diff --git a/install b/install
index bf76ea5..4bb0ee6 100755
--- a/install
+++ b/install
@@ -1,4 +1,4 @@
 #!/bin/bash
 # Version 2

-kpackagetool5 -t Plasma/Applet -i package
+kpackagetool6 -t Plasma/Applet -i package
diff --git a/package/metadata.json b/package/metadata.json
index 817508a..7d3beed 100644
--- a/package/metadata.json
+++ b/package/metadata.json
@@ -1,7 +1,7 @@
 {
   "KPackageStructure": "Plasma/Applet",
-  "Name": "com.koldbyte.kde.termoid",
   "KPlugin": {
+    "Id": "com.koldbyte.kde.termoid",
     "Authors": [
       {
         "Email": "bhaskar.divya007@gmail.com",
@@ -14,7 +14,8 @@
     ],
     "Category": "Windows and Tasks",
     "Description": "A terminal emulator in a plasmoid",
-    "Icon": "utilities-terminal"
+    "Icon": "utilities-terminal",
+    "Version": "0.6"
   },
   "X-Plasma-API-Minimum-Version": "6.0"
 }
diff --git a/reinstall b/reinstall
index c96ede7..2a5039e 100755
--- a/reinstall
+++ b/reinstall
@@ -1,6 +1,6 @@
 #!/bin/bash
 # Version 2

-kpackagetool5 -t Plasma/Applet -u package
+kpackagetool6 -t Plasma/Applet -u package
 killall plasmashell
-kstart5 plasmashell
+kstart plasmashell