Place Control Center tiles freely and host plugin widgets as tiles
Tiles keep the cell they are dropped in, so gaps stay where they are left; moving or resizing onto other tiles pushes those straight down. Enabled plugins with a Noctalia controlCenterWidget entry point are offered as tiles in edit mode. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
72a21c9363
commit
7f1189606c
14 files changed
+412
-157
No files matched your search
@@ -1,12 +1,26 @@
|
||||
pragma Singleton
|
||||
import QtQuick
|
||||
import Quickshell
|
||||
import "../services"
|
||||
|
||||
// Control Center modules. Grid tiles have a default size in cells (w × h,
|
||||
// each 1–4) that the user can change in edit mode; Notifications is a section
|
||||
// under the grid instead.
|
||||
// under the grid instead. Enabled plugins with a Control Center widget add
|
||||
// "plugin:<id>" tiles.
|
||||
Singleton {
|
||||
readonly property var ids: Object.keys(modules).concat(PluginService.controlModules)
|
||||
function entry(id) {
|
||||
if (String(id).startsWith("plugin:")) {
|
||||
const plugin = String(id).slice("plugin:".length);
|
||||
return PluginService.controlModules.includes(id) ? {
|
||||
title: PluginService.title(plugin),
|
||||
glyph: "",
|
||||
w: 1,
|
||||
h: 1,
|
||||
plugin: plugin,
|
||||
source: Qt.resolvedUrl("modules/Plugin.qml")
|
||||
} : null;
|
||||
}
|
||||
return Object.prototype.hasOwnProperty.call(modules, id) ? modules[id] : null;
|
||||
}
|
||||
// Configured size, else the module's default.
|
||||
|
||||
Reference in new issue
Block a user