From dbd996d1668bf18b0c5226b67c0bbaf4f881e27d Mon Sep 17 00:00:00 2001 From: Dmitry Nekrasov Date: Mon, 11 Mar 2024 04:15:36 +0500 Subject: [PATCH 1/2] Migration to KF6 --- contents/ui/main.qml | 14 +++++++------- metadata.desktop | 15 --------------- metadata.json | 20 ++++++++++++++++++++ 3 files changed, 27 insertions(+), 22 deletions(-) delete mode 100644 metadata.desktop create mode 100644 metadata.json diff --git a/contents/ui/main.qml b/contents/ui/main.qml index 5798740..1887509 100644 --- a/contents/ui/main.qml +++ b/contents/ui/main.qml @@ -1,16 +1,16 @@ import QtQuick 2.0 import QtQuick.Layouts 1.1 -import org.kde.plasma.plasmoid 2.0 -import org.kde.plasma.core 2.0 as PlasmaCore -import org.kde.plasma.components 2.0 as PlasmaComponents +import org.kde.plasma.plasmoid +import org.kde.plasma.components as PlasmaComponents +import org.kde.plasma.plasma5support as Plasma5Support -Item { - PlasmaCore.DataSource { +PlasmoidItem { + Plasma5Support.DataSource { id: keystateSource engine: "keystate" connectedSources: ["Caps Lock", "Num Lock", "Scroll Lock"] } - Plasmoid.compactRepresentation: PlasmaComponents.Label { + compactRepresentation: PlasmaComponents.Label { id: mainLabel anchors.centerIn: parent Layout.minimumWidth: units.gridUnit * 4 @@ -40,7 +40,7 @@ Item { return text } } - Plasmoid.fullRepresentation: Item { + fullRepresentation: Item { Layout.minimumWidth: units.gridUnit * 6 Layout.minimumHeight: units.gridUnit * 6 PlasmaComponents.Label { diff --git a/metadata.desktop b/metadata.desktop deleted file mode 100644 index 362a547..0000000 --- a/metadata.desktop +++ /dev/null @@ -1,15 +0,0 @@ -[Desktop Entry] -Name=Key Lock State -Comment=Shows Caps Lock/Num Lock State -Encoding=UTF-8 -#Icon=applications-rss -ServiceTypes=Plasma/Applet -Type=Service -X-KDE-PluginInfo-Author=Lim Yuen Hoe -X-KDE-PluginInfo-Email=yuenhoe86@gmail.com -X-KDE-PluginInfo-Name=com.yuenhoe.lockstate -X-KDE-PluginInfo-License=GPL -X-KDE-PluginInfo-Version=1.1 -X-KDE-PluginInfo-Website=http://techbase.kde.org -X-Plasma-API=declarativeappletscript -X-Plasma-MainScript=ui/main.qml diff --git a/metadata.json b/metadata.json new file mode 100644 index 0000000..e1effa0 --- /dev/null +++ b/metadata.json @@ -0,0 +1,20 @@ +{ + "KPlugin": { + "Authors": [ + { + "Email": "yuenhoe86@gmail.com", + "Name": "Lim Yuen Hoe" + } + ], + "Description": "Shows Caps Lock/Num Lock State", + "Id": "com.yuenhoe.lockstate", + "License": "GPL", + "Name": "Key Lock State", + "ServiceTypes": [ + "Plasma/Applet" + ], + "Version": "1.1", + "Website": "http://techbase.kde.org" + }, + "X-Plasma-API-Minimum-Version": "6.0" +} From a2b44713a35a1931b29d38e6802a3700a30bad32 Mon Sep 17 00:00:00 2001 From: Dmitry Nekrasov Date: Mon, 11 Mar 2024 04:18:03 +0500 Subject: [PATCH 2/2] Update readme.md --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index 4add32a..d4e3575 100644 --- a/readme.md +++ b/readme.md @@ -1,4 +1,4 @@ -**Plasma 5 applet that shows the state of Caps/Num Locks** +**Plasma 6 applet that shows the state of Caps/Num Locks** To install: