diff options
author | Nicolas Lécureuil <neoclust@mageia.org> | 2016-04-24 00:41:47 +0200 |
---|---|---|
committer | Nicolas Lécureuil <neoclust@mageia.org> | 2016-04-24 00:41:47 +0200 |
commit | 1a25c77473c9c012adece16b3d2bbc68d1119982 (patch) | |
tree | 1dc62a8cab5abc3b7c7b35d87fdfbbab042d2749 /usr | |
parent | 0fcef78ed01bd26a30464b921e951e2194b4c28d (diff) | |
download | config-1a25c77473c9c012adece16b3d2bbc68d1119982.tar config-1a25c77473c9c012adece16b3d2bbc68d1119982.tar.gz config-1a25c77473c9c012adece16b3d2bbc68d1119982.tar.bz2 config-1a25c77473c9c012adece16b3d2bbc68d1119982.tar.xz config-1a25c77473c9c012adece16b3d2bbc68d1119982.zip |
Add default mageia layout file
Diffstat (limited to 'usr')
-rw-r--r-- | usr/share/plasma/shells/org.kde.plasma.desktop/contents/layout.js | 117 |
1 files changed, 117 insertions, 0 deletions
diff --git a/usr/share/plasma/shells/org.kde.plasma.desktop/contents/layout.js b/usr/share/plasma/shells/org.kde.plasma.desktop/contents/layout.js new file mode 100644 index 0000000..0913539 --- /dev/null +++ b/usr/share/plasma/shells/org.kde.plasma.desktop/contents/layout.js @@ -0,0 +1,117 @@ +loadTemplate("org.mageia.plasma.desktop.defaultPanel") + +var panel = new Panel +var panelScreen = panel.screen +var freeEdges = {"bottom": true, "top": true, "left": true, "right": true} + +for (i = 0; i < panelIds.length; ++i) { + var tmpPanel = panelById(panelIds[i]) + if (tmpPanel.screen == panelScreen) { + // Ignore the new panel + if (tmpPanel.id != panel.id) { + freeEdges[tmpPanel.location] = false; + } + } +} + +if (freeEdges["bottom"] == true) { + panel.location = "bottom"; +} else if (freeEdges["top"] == true) { + panel.location = "top"; +} else if (freeEdges["left"] == true) { + panel.location = "left"; +} else if (freeEdges["right"] == true) { + panel.location = "right"; +} else { + // There is no free edge, so leave the default value + panel.location = "top"; +} + + +for (var i = 0; i < screenCount; ++i) { + var id = createActivity("Desktop", "org.kde.plasma.folder") + var desktopsArray = desktopsForActivity(id); + for( var j = 0; j < desktopsArray.length; j++) { + desktopsArray[j].wallpaperPlugin = 'org.kde.image' + desktopsArray[j].wallpaperMode = 'SingleImage' + desktopsArray[j].currentConfigGroup = new Array("General") + desktopsArray[j].writeConfig("pressToMove",true) + desktopsArray[j].writeConfig("showToolbox",false) + desktopsArray[j].writeConfig("toolTips", "true") + desktopsArray[j].writeConfig("selectionMarkers",false) + desktopsArray[j].writeConfig("sortMode","-1") + desktopsArray[j].currentConfigGroup = new Array("Wallpaper", "org.kde.image", "General") + desktopsArray[j].writeConfig("Image", "file:///usr/share/mga/backgrounds/default.jpg") + desktopsArray[j].writeConfig("FillMode","2") + } + +// 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) + } +} + +panel.height = gridUnit * 2 + +var kickoff = panel.addWidget("org.kde.plasma.kickoff") +kickoff.currentConfigGroup = ["Shortcuts"] +kickoff.writeConfig("global", "Alt+F1") + +//panel.addWidget("org.kde.plasma.showActivityManager") +panel.addWidget("org.kde.plasma.pager") +panel.addWidget("org.kde.plasma.taskmanager") + +/* 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") + +//sleep(1) +// lock desktop +//locked = true; |