0

I'm customising the KDE desktop environment for our corporate desktop, and I've found what I hope is not a bug -

In short, all I want to do is add a quicklaunch widget to the panel, then populate it with some application shortcuts via the plasma scripting interface.

I have code that I believe should work:

//new panel for testing purposes
var panel = new Panel;
var quicklaunch = panel.addWidget("org.kde.plasma.quicklaunch");  
var qlurls = ["file:///usr/share/applications/firefox.desktop",
          "file:///usr/share/applications/org.kde.dolphin.desktop"
         ];
quicklaunch.currentConfigGroup = ["General"];
quicklaunch.writeConfig("launcherUrls", qlurls);
//confirm it's written correctly
print(quicklaunch.readConfig("launcherUrls"));
//flailing for ideas now?!?
quicklaunch.reloadConfig()

You can test it by starting the scripting console in a KDE session, and copying and pasting:

qdbus org.kde.plasmashell /PlasmaShell showInteractiveConsole

This correctly adds a new panel, a quicklaunch widget, and applies all the same settings that were applied when I interrogated a manually created quicklaunch, but - it doesn't display any of the application shortcuts, just a rocket icon.

What am I doing wrong?

[UPDATE] Confirming it's a bug - I have tested on the KDE Neon distribution, which includes newer plasma packages, and this code works as expected.

1 Answer 1

1

I've been playing around with your code: If you use:

var qlurls = ["file:///usr/share/applications/firefox.desktop",
          "file:///usr/share/applications/org.kde.dolphin.desktop"
         ];

you should get your panel with the application shortcuts.

2
  • Thanks for checking it out - that is (was, edited) indeed missing, but still doesn't apply on the 16.04 plasma packages. It does work as intended on KDE neon though, so it's def a bug.
    – cleary
    Apr 7, 2017 at 3:35
  • For me it worked. But I am indeed on KDE Neon.
    – jarleih
    Apr 7, 2017 at 3:52

Not the answer you're looking for? Browse other questions tagged .