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

Proper way of testing themes / plugins during development

Tags: None
(comma "," separated)
User avatar
MirceaKitsune
Registered Member
Posts
330
Karma
0
OS
One of the most annoying and discouraging things when I want to develop something for KDE is the complexity of testing it. Say you're editing a KWin theme: Your changes will obviously not be applied automatically, to see them you must open a console and constantly do "pkill kwin_x11;kstart5 kwin_x11", which also causes all windows to become maximized and cover the screen. This issue applies to KWin themes, Plasma themes, plasmoids, wallpaper plugins... they all require restarting that KDE component and sometimes deleting cache files under temporary directories, that's how I had to develop in the past and it's extremely annoying.

There must be a better way! Surely someone developed a sandboxed testing method, which can load a theme or plasmoid from a local directory and properly preview it with full functionality. For themes this may be tricky as some require the blur desktop effect to be previewed behind transparent elements, but it's doable.

Can someone explain what's the best method to develop and test themes and plugins for KDE please? This would make devs lives much easier! Thank you.
User avatar
MirceaKitsune
Registered Member
Posts
330
Karma
0
OS
Any thoughts on this please? I've been wanting to play more with editing themes and plasmoids, but waiting on an answer for this question first.
User avatar
MirceaKitsune
Registered Member
Posts
330
Karma
0
OS
I seem to have found what I was looking for: In my distro at least there's a package called plasma-sdk, which installs a tool called plasmoidviewer (console command) among other useful tools used to preview themes. I can now test a plasmoid simply by using this command:

Code: Select all
plasmoidviewer -a "MyWidget"


There's only one issue with it: The plasmoid itself won't show anywhere inside the spawned window. And it's plasmoids I use just fine on the normal desktop so they aren't broken. I see what appears to be a simulated desktop with some buttons at the bottom, but none of the commands and form factors there appear to do anything. Any thoughts on what I might be doing wrong or missing here?

Image
Clancularius
Registered Member
Posts
50
Karma
0
I did it by directing it to the "plasmoid" sub directory. So, say the directory structure is widgetname/plasmoid/contents/ui The command would be plasmoidviewer -a widgetname/plasmoid

It's the same location when installing it also.
User avatar
MirceaKitsune
Registered Member
Posts
330
Karma
0
OS
Sorry for the very late reply. Played with editing a plasmoid again today and tried out the suggested method. Can confirm it works, thanks for the clarification! Indeed it simply requires using the following command on the widget you're testing:

Code: Select all
plasmoidviewer -a NameOfMyWidgetDirectory


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Google [Bot], Yahoo [Bot]