Skip to content

Commit 820f937

Browse files
renner0einffy
andauthored
fix: set pinned apps in panel past Plasma 6.6 (#118)
* fix: set pinned apps in panel past Plasma 6.6 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/ * fix the correct location * fix: make it actually work for new user accounts still using the default kde panel when you make a new default panel * javascript bullshit * I love javascript --------- Co-authored-by: inffy <10782843+inffy@users.noreply.github.com>
1 parent 12f617f commit 820f937

2 files changed

Lines changed: 26 additions & 0 deletions

File tree

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
loadTemplate("org.kde.plasma.desktop.defaultPanel")
2+
3+
const allPanels = panels();
4+
5+
for (let i = 0; i < allPanels.length; ++i) {
6+
const panel = allPanels[i];
7+
const widgets = panel.widgets();
8+
9+
for (let j = 0; j < widgets.length; ++j) {
10+
const widget = widgets[j];
11+
12+
if (widget.type === "org.kde.plasma.icontasks") {
13+
widget.currentConfigGroup = ["General"];
14+
15+
widget.writeConfig("launchers", [
16+
"preferred://browser",
17+
"applications:io.github.kolunmi.Bazaar.desktop",
18+
"applications:org.gnome.Ptyxis.desktop",
19+
"preferred://filemanager"
20+
]);
21+
widget.reloadConfig();
22+
}
23+
}
24+
}
25+

system_files/shared/usr/share/plasma/look-and-feel/dev.getaurora.aurora.desktop/metadata.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,6 @@
1919
"Website": "https://getaurora.dev"
2020
},
2121
"X-KDE-ParentApp": "",
22+
"X-Plasma-RootContainmentLayout": "org.kde.plasma.desktop-layout.js",
2223
"X-Plasma-MainScript": "defaults"
2324
}

0 commit comments

Comments
 (0)