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

Folder view default desktop (javascript)

Tags: plasma5, desktop, folderview, startup, script, javascript plasma5, desktop, folderview, startup, script, javascript plasma5, desktop, folderview, startup, script, javascript
(comma "," separated)
User avatar
arjenbalfoort
Registered Member
Posts
9
Karma
0
OS
I found this code which sets the default desktop to the default Desktop layout:
Code: Select all
var desktopsArray = desktopsForActivity(currentActivity());
for (var j = 0; j < desktopsArray.length; j++) {
    desktopsArray[j].wallpaperPlugin = 'org.kde.image'
    desktopsArray[j].currentConfigGroup = new Array ("Wallpaper", "org.kde.image", "General")
    desktopsArray[j].writeConfig("Image", "file:///usr/share/wallpapers/solydk/contents/images/3840x2160.png")
    desktopsArray[j].writeConfig("FillMode", "2")

    desktopsArray[j].currentConfigGroup = new Array("General");
    desktopsArray[j].writeConfig("pressToMove",true);
    desktopsArray[j].writeConfig("showToolbox",false);
    desktopsArray[j].writeConfig("popups",false);
    desktopsArray[j].writeConfig("selectionMarkers",false);
    desktopsArray[j].writeConfig("sortMode","-1");
}

However, I'd like to set the default desktop to Folder View.
I read the only reference I could find and replace the first line with:
Code: Select all
var id = createActivity("Default", "org.kde.plasma.folder");
var desktopsArray = desktopsForActivity(id);

Unfortunately, that resulted in a black and inresponsive desktop.
Adding this after the for loop didn't work either:
Code: Select all
setCurrentActivity(id);


I'm at a loss right now. So, if anyone can point me in the right direction, I'd very much appreciate that.
User avatar
arjenbalfoort
Registered Member
Posts
9
Karma
0
OS
I hate to bump my post, but please, can somebody tell me how to best debug the startup script?

I tried with these commands:
Code: Select all
kquitapp5 plasmashell; rm -f ~/.config/plasma-org.kde.plasma.desktop-appletsrc; plasmashell &

But I couldn't find any helpful information:
Code: Select all
evaluating startup script: "/usr/share/plasma/look-and-feel/org.kde.solydk.desktop/contents/layouts/org.kde.plasma.desktop-layout.js"
Setting default Containment plugin: "org.kde.plasma.folder"

Nothing more on the script.

Of course, I can add the folder view widget, but that's not what I'm looking for:
Code: Select all
desktopsArray[j].addWidget("org.kde.plasma.folder");
User avatar
fvogt
Registered Member
Posts
1
Karma
0
In openSUSE it's done by adding

Code: Select all
[Desktop][org.kde.plasma.desktop]
Containment=org.kde.plasma.folder


to the contents/defaults file in the look-and-feel.
User avatar
arjenbalfoort
Registered Member
Posts
9
Karma
0
OS
That's it, thank you very much!


Bookmarks



Who is online

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