some more branding

This commit is contained in:
tumillanino
2026-03-26 14:36:06 +11:00
parent 204c1638b9
commit e7d6daf595
317 changed files with 23146 additions and 1 deletions

View File

@@ -0,0 +1,106 @@
var panel = new Panel
var panelScreen = panel.screen
// No need to set panel.location as ShellCorona::addPanel will automatically pick one available edge
// For an Icons-Only Task Manager on the bottom, *3 is too much, *2 is too little
// Round up to next highest even number since the Panel size widget only displays
// even numbers
panel.height = 2 * Math.ceil(gridUnit * 2.5 / 2)
// Restrict horizontal panel to a maximum size of a 21:9 monitor
const maximumAspectRatio = 21/9;
if (panel.formFactor === "horizontal") {
const geo = screenGeometry(panelScreen);
const maximumWidth = Math.ceil(geo.height * maximumAspectRatio);
if (geo.width > maximumWidth) {
panel.alignment = "center";
panel.minimumLength = maximumWidth;
panel.maximumLength = maximumWidth;
}
}
panel.addWidget("org.kde.plasma.kickoff")
//panel.addWidget("org.kde.plasma.showActivityManager")
panel.addWidget("org.kde.plasma.pager")
panel.addWidget("org.kde.plasma.icontasks")
panel.addWidget("org.kde.plasma.marginsseparator")
/* Next up is determining whether to add the Input Method Panel
* widget to the panel or not. This is done based on whether
* the system locale's language id is a member of the following
* white list of languages which are known to pull in one of
* our supported IME backends when chosen during installation
* of common distributions. */
var langIds = ["as", // Assamese
"bn", // Bengali
"bo", // Tibetan
"brx", // Bodo
"doi", // Dogri
"gu", // Gujarati
"hi", // Hindi
"ja", // Japanese
"kn", // Kannada
"ko", // Korean
"kok", // Konkani
"ks", // Kashmiri
"lep", // Lepcha
"mai", // Maithili
"ml", // Malayalam
"mni", // Manipuri
"mr", // Marathi
"ne", // Nepali
"or", // Odia
"pa", // Punjabi
"sa", // Sanskrit
"sat", // Santali
"sd", // Sindhi
"si", // Sinhala
"ta", // Tamil
"te", // Telugu
"th", // Thai
"ur", // Urdu
"vi", // Vietnamese
"zh_CN", // Simplified Chinese
"zh_TW"] // Traditional Chinese
if (langIds.indexOf(languageId) != -1) {
panel.addWidget("org.kde.plasma.kimpanel");
}
panel.addWidget("org.kde.plasma.systemtray")
panel.addWidget("org.kde.plasma.digitalclock")
panel.addWidget("org.kde.plasma.showdesktop")
const allPanels = panels();
for (let i = 0; i < allPanels.length; ++i) {
const panel = allPanels[i];
const widgets = panel.widgets();
for (let j = 0; j < widgets.length; ++j) {
const widget = widgets[j];
if (widget.type === "org.kde.plasma.icontasks") {
widget.currentConfigGroup = ["General"];
// Read the current launchers value
const currentLaunchers = widget.readConfig("launchers", "");
// Only set our default if launchers is empty
if (!currentLaunchers || currentLaunchers.trim() === "") {
widget.writeConfig("launchers", [
"preferred://browser",
"applications:Alacritty.desktop",
"applications:io.github.kolunmi.Bazaar.desktop",
"preferred://filemanager",
"cockos-reaper.desktop"
]);
widget.reloadConfig();
}
}
}
}