mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +00:00
layout-templates: Move default panel configuration to layout template package
This commit is contained in:
parent
5c53f9b6d2
commit
b4f7ca1139
5 changed files with 43 additions and 11 deletions
|
|
@ -116,6 +116,7 @@ add_subdirectory(kded)
|
|||
add_subdirectory(kwin)
|
||||
add_subdirectory(envmanager)
|
||||
add_subdirectory(initialstart)
|
||||
add_subdirectory(layout-templates)
|
||||
|
||||
find_program(PlasmaOpenSettings plasma-open-settings)
|
||||
set_package_properties(PlasmaOpenSettings PROPERTIES
|
||||
|
|
|
|||
3
layout-templates/CMakeLists.txt
Normal file
3
layout-templates/CMakeLists.txt
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
# SPDX-FileCopyrightText: 2024 Devin Lin <devin@kde.org>
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
plasma_install_package(org.kde.plasma.mobile.defaultMobileLayout org.kde.plasma.mobile.defaultMobileLayout layout-templates layout-template)
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
// SPDX-FileCopyrightText: 2024 Devin Lin <devin@kde.org>
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
const panel = new Panel("org.kde.plasma.mobile.panel");
|
||||
panel.location = "top";
|
||||
panel.addWidget("org.kde.plasma.notifications");
|
||||
panel.height = 1.25 * gridUnit; // HACK: supposed to be gridUnit + smallSpacing, but it doesn't seem to give the correct number
|
||||
|
||||
const bottomPanel = new Panel("org.kde.plasma.mobile.taskpanel")
|
||||
bottomPanel.location = "bottom";
|
||||
bottomPanel.height = 2 * gridUnit;
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"KPackageStructure": "Plasma/LayoutTemplate",
|
||||
"KPlugin": {
|
||||
"Authors": [
|
||||
{
|
||||
"Email": "devin@kde.org",
|
||||
"Name": "Devin Lin"
|
||||
}
|
||||
],
|
||||
"Category": "",
|
||||
"Description": "Default panel layout for mobile, including status bar and navigation panel",
|
||||
"EnabledByDefault": true,
|
||||
"Id": "org.kde.plasma.mobile.defaultMobileLayout",
|
||||
"License": "LGPLv2+",
|
||||
"Name": "Default Mobile Layout",
|
||||
"Website": "https://www.kde.org/plasma-desktop"
|
||||
},
|
||||
"X-Plasma-ContainmentCategories": [
|
||||
"panel"
|
||||
],
|
||||
"X-Plasma-Shell": "plasmashell"
|
||||
}
|
||||
|
||||
|
|
@ -5,23 +5,17 @@
|
|||
// SPDX-FileCopyrightText: 2021 Devin Lin <devin@kde.org>
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
// Load panel layout
|
||||
loadTemplate("org.kde.plasma.mobile.defaultMobileLayout")
|
||||
|
||||
// Set wallpaper plugin
|
||||
var desktopsArray = desktopsForActivity(currentActivity());
|
||||
for (var j = 0; j < desktopsArray.length; j++) {
|
||||
desktopsArray[j].wallpaperPlugin = "org.kde.image";
|
||||
|
||||
if (j == 0) {
|
||||
// add meta shortcut
|
||||
// Add meta shortcut
|
||||
desktopsArray[0].currentConfigGroup = ["Shortcuts"]
|
||||
desktopsArray[0].writeConfig("global", "Meta+F1")
|
||||
}
|
||||
}
|
||||
|
||||
// keep this list in sync with shell/contents/updates/panelsfix.js
|
||||
var panel = new Panel("org.kde.plasma.mobile.panel");
|
||||
panel.location = "top";
|
||||
panel.addWidget("org.kde.plasma.notifications");
|
||||
panel.height = 1.25 * gridUnit; // HACK: supposed to be gridUnit + smallSpacing, but it doesn't seem to give the correct number
|
||||
|
||||
var bottomPanel = new Panel("org.kde.plasma.mobile.taskpanel")
|
||||
bottomPanel.location = "bottom";
|
||||
bottomPanel.height = 2 * gridUnit;
|
||||
|
|
|
|||
Loading…
Reference in a new issue