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

Changing to folderview via Plasma desktop scripting

Tags: None
(comma "," separated)
jasonayala
Registered Member
Posts
7
Karma
0
Hello.

I'm trying to change the desktop to folderview (and set wallpaper) using a .js file in `kf5-config --path data`/plasma/shells/org.kde.plasma.desktop/updates/ so that users get a folderview in Plasma desktop < 5.10

Notes: This is for the distro Whonix, running debian. We won't get 5.10 (where folderview is the new-old default) for a while. I've explored changing`/usr/share/plasma/shells/org.kde.plasma.desktop/contents/defaults`; changing ~/.config/plasma-org.kde.plasma.desktop-appletsrc via /etc/skel; and even XDG viewtopic.php?f=289&t=141930&p=381724; (https://www.whonix.org/wiki/Dev/KDE#TODO).

A simple .js snippet would be a great solution, but alas, I can't make heads or tails of https://userbase.kde.org/KDE_System_Adm ... pScripting. We once used the script pasted below, but it no longer works.

Is there any Plasma 5 (two..?) scripter than can help us out?

Code: Select all
//# Modified for Whonix, see COPYING for copying conditions.

loadTemplate("org.kde.plasma-desktop.defaultPanel")

for (var i = 0; i < screenCount; ++i) {
    // Whonix changes to 00-defaultLayout.js
    //var activity = new Activity
    var activity = new Activity("folderview")
    activity.wallpaperPlugin = "image"
    activity.wallpaperMode = "SingleImage"
    activity.currentConfigGroup = Array("Wallpaper", "image")
    //activity.writeConfig("wallpaper", "/usr/share/wallpapers/Ariya/contents/images/1024x768.png")
    // End of Whonix changes to 00-defaultLayout.js
    desktop.name = i18n("Desktop")
    desktop.screen = i
    desktop.wallpaperPlugin = 'image'
    desktop.wallpaperMode = 'SingleImage'

    //Create more panels for other screens
    if (i > 0){
        var panel = new Panel
        panel.screen = i
        panel.location = 'bottom'
        panel.height = panels()[i].height = screenGeometry(0).height >
1024 ? 35 : 27
        var tasks = panel.addWidget("tasks")
        tasks.writeConfig("showOnlyCurrentScreen", true);
    }
}


Bookmarks



Who is online

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