This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Need help getting started with KWin 5 scripting in Fedora 23

Tags: None
(comma "," separated)
atemple
Registered Member
Posts
3
Karma
0
I also posted this in the askfedoraprojects website, but this is pretty specific to plasma.

I just installed a KDE Live spin of Fedora 23, and wanting to find a way to manage windows within QML. The KWin interface and using their scripting seems most appropriate just via the documentation, but I'm having some issues getting started. https://techbase.kde.org/Development/... (There doesn't seem to be an updated API documentation for 5.5, but it's probably similar enough for reference...)

I managed to find the location of some example scripts on my own (regardless of what the documentation says...) at /usr/share/kwin/scripts, just to see how the modules are used. I've loaded up a couple of the sample qml files into Qt Creator, and it has issues loading some of the kwin and plasma plugins.

Code: Select all
import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.components 2.0 as Plasma
import org.kde.kquickcontrolsaddons 2.0 as KQuickControlsAddons
import org.kde.kwin 2.0


So the Fedora spin DOES contain some qml plugins in the appropriate location with the installed qt5 RPM packages (/usr/lib64/qt5/qml), but the kwin plugin doesn't exist, and the plasma.core plugin generates an error in Qt Creator (qmlplugindump error. QML module does not contain information about components containing in plugins).

Being able to manage and layer windows within a QML file is EXACTLY what I'm needing, so I'd love to be able to use this interface, but there just doesn't seem to be anything to help get started or begin using the classes. I do see some kf5 C++ framework items, but I'm not sure if that will get me the QML plugins for kwin scripting I'm looking for...

Any assistance to at least get started using KWin scripting would be greatly appreciated. Thank you.

-Edit- Seeing quite a few views with no responses makes me think that people were looking at it with the same question I was asking hoping for the answer, so I changed the subject post to be more accurate...
alexanderhayes
Registered Member
Posts
3
Karma
0
I'm in a similar situation, but I've had some success with the scripting console instead of qtcreator. The console can be found using the qdbusviewer under org.kde.plasmashell /PlasmaShell Method: showInteractiveConsole.

To launch from a terminal type: qdbus org.kde.plasmashell /PlasmaShell showInteractiveConsole

Update: I've now also come across the tool "qmlplugindump" which is how to import qml module info to allow qtcreator to recognize it and compile it. https://unix0.wordpress.com/2012/08/07/how-to-add-qml-module-with-plugins-for-qt-creator/ has a really good explanation of this.
atemple
Registered Member
Posts
3
Karma
0
That would be helpful, except one of my biggest issues is I can't find the kwin modules anywhere... including the ones used in their own provided sample scripts. I'd like to know where I can get them, or which packages provide them.
alexanderhayes
Registered Member
Posts
3
Karma
0
So I came across this by accident, but the folders you may be looking for are in /usr/lib/qt/qml/org/kde/. On my system the qml modules for kde are missing a lot of info and qmlplugindump fails with them.
atemple
Registered Member
Posts
3
Karma
0
alexanderhayes wrote:So I came across this by accident, but the folders you may be looking for are in /usr/lib/qt/qml/org/kde/. On my system the qml modules for kde are missing a lot of info and qmlplugindump fails with them.


Yep, this is the exact thing I'm seeing and asking about as well.


Bookmarks



Who is online

Registered users: Bing [Bot], daret, Google [Bot], sandyvee, Sogou [Bot]