fix: set pinned apps in panel past Plasma 6.6#118
Conversation
This has to be tested with this file added to the current theme and making a new user account on at least Plasma 6.5.90 or higher. This script can be debugged by running it in `plasma-interactiveconsole` See: https://bugs.kde.org/show_bug.cgi?id=511560 Docs: https://develop.kde.org/docs/plasma/scripting/
Plasma 6.6 changed the way this is done, this config file doesn't exist anymore See: get-aurora-dev/common#118 https://bugs.kde.org/show_bug.cgi?id=511560
...look-and-feel/dev.getaurora.aurora.desktop/contents/layouts/org.kde.plasma.desktop-layout.js
Outdated
Show resolved
Hide resolved
still using the default kde panel when you make a new default panel
|
So this works for new users, but if you upgrade from 6.5.5 from the old config setup (with no changes to this one it's gonna be like the 2nd one shown above and be the default KDE setup, might probably want to respin ISOs at least so it's not broken by default after you reboot into the first update. |
If I understand you correctly, you are saying that once this PR is merged and we respin ISOs, then there will not be an issue anymore, correct? |
Yes, as this only runs on first user setup and is basically incompatible with the way we were doing it before. |
Plasma 6.6 changed the way this is done, this config file doesn't exist anymore See: get-aurora-dev/common#118 https://bugs.kde.org/show_bug.cgi?id=511560
|
Why not simplify the code a little bit? I tested with plasma-interactiveconsole that this still iterates over the widgets as expected, less verbose. Just hurts my JS soul a bit xd loadTemplate("org.kde.plasma.desktop.defaultPanel");
for (const panel of panels()) {
for (const widget of panel.widgets()) {
if (widget.type === "org.kde.plasma.icontasks") {
widget.currentConfigGroup = ["General"];
widget.writeConfig("launchers", [
"preferred://browser",
"applications:io.github.kolunmi.Bazaar.desktop",
"applications:org.gnome.Ptyxis.desktop",
"preferred://filemanager",
]);
widget.reloadConfig();
}
}
}And speaking of default pinned apps, can't we have ordering of: browser, then file manager, then store and terminal? Feels like much more natural order to me... Call me Windows-brained, but the first three is the order they did for ages, so anything else doesn't sit right for anyone moving over from that OS. Just my 3 cents. |
Yeah I'm a bloody beginner to Javascript, I'm sure it's horrible. Feel free to make that PR and we can discuss this further. |
This has to be tested with this file added to the current theme and making a new user account on at least Plasma 6.5.90 or higher.
This script can be debugged by running it in
plasma-interactiveconsoleSee: https://bugs.kde.org/show_bug.cgi?id=511560
Docs: https://develop.kde.org/docs/plasma/scripting/
should look like this:

instead of this broken default layout (the blank icon is dicsover):
