aboutsummaryrefslogtreecommitdiffstats
path: root/desktop
diff options
context:
space:
mode:
Diffstat (limited to 'desktop')
-rw-r--r--desktop/Drawer.qml69
-rw-r--r--desktop/Page.qml3
-rw-r--r--desktop/README.md16
-rw-r--r--desktop/island/StatusPill.qml3
-rw-r--r--desktop/island/perf/Perf.qml6
-rw-r--r--desktop/island/perf/PerfPanel.qml7
-rw-r--r--desktop/modules/clipboard/Clip.js41
-rw-r--r--desktop/modules/clipboard/ClipboardModule.qml39
-rw-r--r--desktop/modules/clipboard/ClipboardPage.qml194
-rw-r--r--desktop/modules/clipboard/README.md29
-rw-r--r--desktop/modules/clipboard/test_clip.js47
-rw-r--r--desktop/modules/perf/PerfModule.qml63
-rw-r--r--desktop/shell.qml6
13 files changed, 492 insertions, 31 deletions
diff --git a/desktop/Drawer.qml b/desktop/Drawer.qml
index 31067f8..4285506 100644
--- a/desktop/Drawer.qml
+++ b/desktop/Drawer.qml
@@ -153,34 +153,58 @@ Scope {
NotificationList {
id: notifications
anchors { top: parent.top; left: parent.left; right: parent.right }
- anchors.bottom: grid.top
+ anchors.bottom: tiles.top
anchors.bottomMargin: 16
onHistory: root.history = true
}
- // Fixed, never scrolled. Three columns at 600px with a
- // 180px minimum; tiles wrap and add rows, ceiling 3x3.
- Flow {
- id: grid
+ // At most three rows tall; more tiles scroll inside
+ // this box, so the notification space above never
+ // shrinks when a module is added.
+ Flickable {
+ id: tiles
anchors { left: parent.left; right: parent.right; bottom: parent.bottom }
- spacing: 10
-
- Repeater {
- model: root.modules
-
- Tile {
- required property QtObject modelData
- // Three columns, or fewer if the panel is
- // narrower than three 180px tiles allow.
- width: (grid.width - 2 * grid.spacing) / 3
- icon: modelData.icon
- label: modelData.label
- active: modelData.active
- content: modelData.tileContent
- onClicked: root.activate(modelData)
+ readonly property int maxRows: 3
+ height: Math.min(grid.height, maxRows * 96 + (maxRows - 1) * grid.spacing)
+ contentHeight: grid.height
+ clip: true
+ boundsBehavior: Flickable.StopAtBounds
+
+ Flow {
+ id: grid
+ width: tiles.width
+ spacing: 10
+
+ Repeater {
+ model: root.modules
+
+ Tile {
+ required property QtObject modelData
+ // Three columns, or fewer if the panel is
+ // narrower than three 180px tiles allow.
+ width: (grid.width - 2 * grid.spacing) / 3
+ icon: modelData.icon
+ label: modelData.label
+ active: modelData.active
+ content: modelData.tileContent
+ onClicked: root.activate(modelData)
+ }
}
}
}
+
+ // A thin bar in the panel margin, there only when a row
+ // is hidden, so the fourth row is discoverable. Outside
+ // the Flickable, whose clip would hide it.
+ Rectangle {
+ visible: tiles.contentHeight > tiles.height
+ anchors { left: tiles.right; leftMargin: 6 }
+ y: tiles.y + tiles.visibleArea.yPosition * tiles.height
+ width: 3
+ height: tiles.visibleArea.heightRatio * tiles.height
+ radius: 1.5
+ color: Qt.alpha(Theme.accent, 0.6)
+ }
}
// --- page view ---
@@ -195,7 +219,10 @@ Scope {
// The Page's back arrow returns to the grid. Without this
// the header button is inert, since the page only emits
// `back` and does not know who hosts it.
- onLoaded: if (item && item.back) item.back.connect(() => root.page = "")
+ onLoaded: {
+ if (item && item.back) item.back.connect(() => root.page = "");
+ if (item && item.dismiss) item.dismiss.connect(root.close);
+ }
// The page header shows the module's tile glyph. A Binding,
// not an assignment in onLoaded, so a module whose icon
diff --git a/desktop/Page.qml b/desktop/Page.qml
index 4ef50c1..cb717e8 100644
--- a/desktop/Page.qml
+++ b/desktop/Page.qml
@@ -20,6 +20,9 @@ Item {
property string icon: ""
default property alias content: holder.data
signal back
+ // Closes the whole drawer, for a page whose action is finished once done
+ // (the clipboard copies and gets out of the way).
+ signal dismiss
Item {
id: header
diff --git a/desktop/README.md b/desktop/README.md
index 5536d7d..b0d3a2a 100644
--- a/desktop/README.md
+++ b/desktop/README.md
@@ -1,7 +1,8 @@
# desktop
One drawer, left of DP-1, hosting the things a desktop lets you adjust.
-Reached over IPC (`ipc call drawer toggle`), from a Hyprland bind.
+Reached over IPC (`ipc call drawer toggle`), from SUPER pressed and released
+alone, a Hyprland release bind.
The same process also hosts the island, see `island/README.md`.
The drawer opens as a grid of tiles, and clicking a tile either opens that
@@ -32,6 +33,8 @@ the IPC layer rejects. The page-less grid entry is therefore the zero-argument
modules/vm/ libvirt state, live stats, snapshots
modules/appearance/ a tile that opens the separate appearance shell
modules/ai/ local AI engines, start/stop for the apps using them
+ modules/perf/ the island's performance panel at drawer size
+ modules/clipboard/ cliphist history: search, copy, delete, clear all
Sound, mail, vm, network, bluetooth, kdeconnect and ai each carry their own README.
Appearance is a tile onto the separate appearance shell, whose README covers the
@@ -105,9 +108,14 @@ click outside closes it.
The top of the panel is an empty reserved area for the notification engine. It
is an empty `Item` claiming the space, not a placeholder graphic, so the grid
below it sits where it will sit once notifications arrive. The bottom is a
-fixed, never-scrolled `Flow` grid: three columns at 180px minimum, wrapping
-and adding rows up to a 3x3 ceiling for the modules that exist, in the order
-Sound, Network, Bluetooth, KDE Connect, Mail, Appearance, Machines.
+`Flow` grid of three columns inside a `Flickable` capped at three rows: a
+fourth row scrolls inside that box rather than pushing into the notification
+space, and a thin accent bar in the margin shows only when a row is hidden.
+The order is Sound, Network, Bluetooth, KDE Connect, Mail, Status,
+Performance, Clipboard, VMs, AI, Appearance, the everyday ones first.
+
+A page can close the whole drawer by emitting `dismiss` from its `Page`, as
+the clipboard does after a copy; `back` returns to the grid.
## Hyprland
diff --git a/desktop/island/StatusPill.qml b/desktop/island/StatusPill.qml
index f064f98..953b713 100644
--- a/desktop/island/StatusPill.qml
+++ b/desktop/island/StatusPill.qml
@@ -41,9 +41,6 @@ Capsule {
panelHeight: (panel === "perf" ? (perfPanel.item ? perfPanel.item.implicitHeight : 0)
: soundPanel.implicitHeight) + 28
- // The detailed sampling (per-core, network, VRAM) runs only while the
- // panel shows it.
- Binding { target: Perf; property: "detailed"; value: pill.panel === "perf" }
Row {
id: restRow
diff --git a/desktop/island/perf/Perf.qml b/desktop/island/perf/Perf.qml
index 3153cec..53d8670 100644
--- a/desktop/island/perf/Perf.qml
+++ b/desktop/island/perf/Perf.qml
@@ -21,13 +21,15 @@ import "Perf.js" as P
// The numbers behind the performance panel and the status pill's icon. CPU,
// RAM, temperatures and disks are sampled always, so the icon can warn while
// the panel is closed; per-core load, the network rate, VRAM and the fan only
-// while `detailed`, which the status pill binds to the panel being open.
+// while `detailed`, which is any PerfPanel existing (island or drawer).
// /proc and /sys are FileViews reloaded on a timer, no subprocess; df, the
// fdinfo scan, ip and curl are Processes.
Singleton {
id: root
- property bool detailed: false
+ // PerfPanel instances alive; each counts itself in and out.
+ property int viewers: 0
+ readonly property bool detailed: viewers > 0
// ponytail: host constants, as conky had them. One mount per NFS server
// (Library and Slackware are one export, so are shared and backup); br0
diff --git a/desktop/island/perf/PerfPanel.qml b/desktop/island/perf/PerfPanel.qml
index 5aad9b6..f149d82 100644
--- a/desktop/island/perf/PerfPanel.qml
+++ b/desktop/island/perf/PerfPanel.qml
@@ -37,6 +37,13 @@ GridLayout {
function sensor(label) {
return Perf.temps.find(t => t.label === label) || { value: null, warn: 0, crit: 0 };
}
+ // Detailed sampling (per-core, network, VRAM, fan) runs while any panel
+ // exists. The island loads one only while open and the drawer page only
+ // while shown, so counting instances is the whole gate, and two of them
+ // never clear it under each other.
+ Component.onCompleted: Perf.viewers++
+ Component.onDestruction: Perf.viewers--
+
function pct(part, whole) { return part === null || !whole ? null : 100 * part / whole; }
function last(list) { return list.length ? list[list.length - 1] : null; }
// Conky's glyphs, re-checked in Inconsolata Nerd Font.
diff --git a/desktop/modules/clipboard/Clip.js b/desktop/modules/clipboard/Clip.js
new file mode 100644
index 0000000..2745bfa
--- /dev/null
+++ b/desktop/modules/clipboard/Clip.js
@@ -0,0 +1,41 @@
+.pragma library
+
+// Copyright (C) 2026 Danilo M. <danix@danix.xyz>
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License version 2 as
+// published by the Free Software Foundation.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// cliphist's list output, parsed and filtered. Pure, so test_clip.js runs it
+// under node.
+
+// One entry per line of `cliphist list`: "<id>\t<preview>". The whole line is
+// kept, because decode and delete take it back verbatim on stdin. An image is
+// a preview cliphist writes as "[[ binary data <size> <type> <WxH> ]]".
+function parse(text) {
+ const out = [];
+ for (const line of text.split("\n")) {
+ const tab = line.indexOf("\t");
+ if (tab <= 0) continue;
+ const preview = line.slice(tab + 1);
+ out.push({
+ line: line,
+ id: line.slice(0, tab),
+ text: preview,
+ image: /^\[\[ binary data .* (png|jpe?g|gif|webp|bmp) /.test(preview),
+ });
+ }
+ return out;
+}
+
+// Case-insensitive substring match on the preview; an empty query keeps all.
+function filter(entries, query) {
+ const q = query.trim().toLowerCase();
+ if (q === "") return entries;
+ return entries.filter(e => e.text.toLowerCase().indexOf(q) >= 0);
+}
diff --git a/desktop/modules/clipboard/ClipboardModule.qml b/desktop/modules/clipboard/ClipboardModule.qml
new file mode 100644
index 0000000..25a8cc3
--- /dev/null
+++ b/desktop/modules/clipboard/ClipboardModule.qml
@@ -0,0 +1,39 @@
+// Copyright (C) 2026 Danilo M. <danix@danix.xyz>
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License version 2 as
+// published by the Free Software Foundation.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+import QtQuick
+import "../.."
+
+// The clipboard history kept by `wl-paste --watch cliphist store`, which
+// autostart runs. Nothing runs here while the drawer is closed: the page
+// reads cliphist when it opens.
+Module {
+ name: "clipboard"
+ label: "Clipboard"
+
+ // fa-clipboard, present in Inconsolata Nerd Font.
+ icon: ""
+
+ page: Component {
+ Page {
+ id: pg
+ title: "Clipboard"
+ ClipboardPage {
+ width: parent.width
+ // Page wraps its content in a ScrollView. The list is
+ // virtualized and scrolls itself, so it takes exactly the
+ // visible height and the outer view never scrolls.
+ height: pg.height - 57
+ onCopied: pg.dismiss()
+ }
+ }
+ }
+}
diff --git a/desktop/modules/clipboard/ClipboardPage.qml b/desktop/modules/clipboard/ClipboardPage.qml
new file mode 100644
index 0000000..945557c
--- /dev/null
+++ b/desktop/modules/clipboard/ClipboardPage.qml
@@ -0,0 +1,194 @@
+// Copyright (C) 2026 Danilo M. <danix@danix.xyz>
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License version 2 as
+// published by the Free Software Foundation.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+import Quickshell
+import Quickshell.Io
+import QtQuick
+import QtQuick.Controls
+import "../.."
+import "Clip.js" as Clip
+
+// Search, a newest-first list, copy on click or Enter, delete per row, clear
+// all behind a confirmation. Entries go to cliphist as arguments or stdin,
+// never inside a command string: clipboard text is untrusted.
+Item {
+ id: page
+
+ signal copied()
+
+ property var entries: []
+ readonly property var shown: Clip.filter(entries, search.text)
+
+ // Thumbnails decode here, on tmpfs, and are reused until a reboot.
+ readonly property string thumbDir:
+ (Quickshell.env("XDG_RUNTIME_DIR") || "/tmp") + "/qs-clip"
+
+ function copy(entry) {
+ Quickshell.execDetached(["sh", "-c", 'printf %s "$1" | cliphist decode | wl-copy',
+ "sh", entry.line]);
+ page.copied();
+ }
+
+ function remove(entry) {
+ Quickshell.execDetached(["sh", "-c", 'printf %s "$1" | cliphist delete', "sh", entry.line]);
+ page.entries = page.entries.filter(e => e.id !== entry.id);
+ }
+
+ Process {
+ running: true
+ command: ["cliphist", "list"]
+ stdout: StdioCollector { onStreamFinished: page.entries = Clip.parse(this.text) }
+ }
+
+ Row {
+ id: bar
+ anchors { top: parent.top; left: parent.left; right: parent.right }
+ spacing: 8
+
+ TextField {
+ id: search
+ width: bar.width - clear.width - bar.spacing
+ height: 32
+ placeholderText: "Search"
+ color: Theme.text
+ font { family: Theme.fontFamily; pixelSize: Theme.fontSize - 2 }
+ background: Rectangle {
+ radius: 6
+ color: Qt.alpha(Theme.surface, 0.9)
+ border.width: 1
+ border.color: Qt.alpha(Theme.text, 0.15)
+ }
+ Component.onCompleted: forceActiveFocus()
+ onTextChanged: list.currentIndex = 0
+
+ Keys.onUpPressed: list.decrementCurrentIndex()
+ Keys.onDownPressed: list.incrementCurrentIndex()
+ Keys.onReturnPressed: if (list.currentIndex >= 0 && page.shown.length) page.copy(page.shown[list.currentIndex])
+ Keys.onEnterPressed: if (list.currentIndex >= 0 && page.shown.length) page.copy(page.shown[list.currentIndex])
+ }
+
+ // Two clicks: the first arms it for 3 seconds.
+ Button {
+ id: clear
+ anchors.verticalCenter: parent.verticalCenter
+ danger: true
+ text: confirm.running ? "Confirm?" : "Clear all"
+ enabled: page.entries.length > 0
+ onClicked: {
+ if (!confirm.running) { confirm.start(); return; }
+ confirm.stop();
+ Quickshell.execDetached(["cliphist", "wipe"]);
+ page.entries = [];
+ }
+ Timer { id: confirm; interval: 3000 }
+ }
+ }
+
+ ListView {
+ id: list
+ anchors { top: bar.bottom; topMargin: 10; left: parent.left; right: parent.right; bottom: parent.bottom }
+ clip: true
+ spacing: 4
+ model: page.shown
+ highlightMoveDuration: 0
+ boundsBehavior: Flickable.StopAtBounds
+ ScrollBar.vertical: ScrollBar {}
+
+ Text {
+ anchors.centerIn: parent
+ visible: page.shown.length === 0
+ text: page.entries.length === 0 ? "Clipboard history is empty" : "No match"
+ color: Theme.subtext
+ font { family: Theme.fontFamily; pixelSize: Theme.fontSize - 2 }
+ }
+
+ delegate: Rectangle {
+ id: row
+ required property var modelData
+ required property int index
+
+ width: list.width
+ height: modelData.image ? 96 : 36
+ radius: 8
+ color: rowArea.containsMouse || ListView.isCurrentItem
+ ? Qt.alpha(Theme.accent, 0.18) : Qt.alpha(Theme.surface, 0.35)
+
+ // Decoded once per entry, then reused from thumbDir. The id and
+ // line are arguments, the paths are built by the shell from them.
+ property string thumb: ""
+ Process {
+ running: row.modelData.image
+ command: ["sh", "-c",
+ 'mkdir -p "$1" && f="$1/$2.png" && { [ -s "$f" ] || printf %s "$3" | cliphist decode > "$f"; } && printf %s "$f"',
+ "sh", page.thumbDir, row.modelData.id, row.modelData.line]
+ stdout: StdioCollector { onStreamFinished: row.thumb = this.text }
+ }
+
+ MouseArea {
+ id: rowArea
+ anchors.fill: parent
+ hoverEnabled: true
+ cursorShape: Qt.PointingHandCursor
+ onClicked: page.copy(row.modelData)
+ }
+
+ Image {
+ id: thumbImg
+ visible: row.modelData.image
+ anchors { left: parent.left; leftMargin: 8; verticalCenter: parent.verticalCenter }
+ width: 140
+ height: 80
+ fillMode: Image.PreserveAspectFit
+ asynchronous: true
+ sourceSize: Qt.size(280, 160)
+ source: row.thumb ? "file://" + row.thumb : ""
+ }
+
+ Text {
+ anchors {
+ left: row.modelData.image ? thumbImg.right : parent.left
+ leftMargin: 10
+ right: del.left; rightMargin: 8
+ verticalCenter: parent.verticalCenter
+ }
+ elide: Text.ElideRight
+ maximumLineCount: 1
+ textFormat: Text.PlainText
+ // One line: a multi-line entry shows its first line's worth.
+ text: row.modelData.text.replace(/\s+/g, " ")
+ color: row.modelData.image ? Theme.subtext : Theme.text
+ font { family: Theme.fontFamily; pixelSize: Theme.fontSize - 3 }
+ }
+
+ Rectangle {
+ id: del
+ anchors { right: parent.right; rightMargin: 6; verticalCenter: parent.verticalCenter }
+ width: 26; height: 26; radius: 13
+ color: delArea.containsMouse ? Qt.alpha(Theme.red, 0.3) : "transparent"
+
+ Text {
+ anchors.centerIn: parent
+ text: ""
+ font { family: Theme.iconFamily; pixelSize: 12 }
+ color: delArea.containsMouse ? Theme.red : Theme.subtext
+ }
+
+ MouseArea {
+ id: delArea
+ anchors.fill: parent
+ hoverEnabled: true
+ cursorShape: Qt.PointingHandCursor
+ onClicked: page.remove(row.modelData)
+ }
+ }
+ }
+ }
+}
diff --git a/desktop/modules/clipboard/README.md b/desktop/modules/clipboard/README.md
new file mode 100644
index 0000000..4502349
--- /dev/null
+++ b/desktop/modules/clipboard/README.md
@@ -0,0 +1,29 @@
+# clipboard
+
+The clipboard history as a drawer page, replacing the rofi list. The history
+itself is cliphist's, fed by `wl-paste --watch cliphist store` from autostart;
+this module only reads and edits it. CTRL+SHIFT+L opens the drawer straight on
+this page (`ipc call drawer open clipboard`).
+
+- The search field has focus on open and filters as you type, ignoring case.
+- Up and Down move the highlight; Enter or a click copies the entry and closes
+ the drawer.
+- `×` on a row deletes that entry; "Clear all" asks once more ("Confirm?",
+ 3 seconds) and then runs `cliphist wipe`.
+
+Nothing runs while the drawer is closed: the page runs `cliphist list` when
+it opens. 750 entries measured, 42 of them images.
+
+**Entries are untrusted text.** Copy and delete pass the cliphist line to
+`sh -c` as `$1` and print it into `cliphist decode` or `cliphist delete`; it
+never becomes part of a command string.
+
+**Images show as thumbnails.** A row whose preview is cliphist's
+`[[ binary data <size> <type> <WxH> ]]` decodes the entry once into
+`$XDG_RUNTIME_DIR/qs-clip/<id>.png` and reuses the file after. That directory
+is tmpfs, so a reboot clears it. The list is a `ListView`, so only rows that
+are created decode.
+
+`Clip.js` holds the parsing and the filter, tested with:
+
+ node desktop/modules/clipboard/test_clip.js
diff --git a/desktop/modules/clipboard/test_clip.js b/desktop/modules/clipboard/test_clip.js
new file mode 100644
index 0000000..e4525f8
--- /dev/null
+++ b/desktop/modules/clipboard/test_clip.js
@@ -0,0 +1,47 @@
+// Copyright (C) 2026 Danilo M. <danix@danix.xyz>
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License version 2 as
+// published by the Free Software Foundation.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// Run: node desktop/modules/clipboard/test_clip.js
+// Clip.js is a QML library, so its .pragma line is stripped before node
+// evaluates it, as test_perf.js does for Perf.js.
+
+const fs = require("fs");
+const assert = require("assert");
+
+const src = fs.readFileSync(__dirname + "/Clip.js", "utf8")
+ .replace(/^\.pragma library$/m, "");
+const C = new Function(src + "\nreturn { parse, filter };")();
+
+const list = [
+ "812\tgit push --force-with-lease",
+ "811\t[[ binary data 2 MiB png 2560x1080 ]]",
+ "810\tA line\twith a tab",
+ "",
+ "garbage without a tab",
+].join("\n");
+const e = C.parse(list);
+
+assert.strictEqual(e.length, 3);
+assert.deepStrictEqual(e[0], { line: "812\tgit push --force-with-lease", id: "812",
+ text: "git push --force-with-lease", image: false });
+assert.strictEqual(e[1].image, true);
+// Only the first tab separates the id; the rest is the text, and the line is
+// kept whole for decode.
+assert.strictEqual(e[2].text, "A line\twith a tab");
+assert.strictEqual(e[2].line, "810\tA line\twith a tab");
+// Text that merely mentions binary data is not an image.
+assert.strictEqual(C.parse("9\tthe [[ binary data ]] marker")[0].image, false);
+
+assert.strictEqual(C.filter(e, "").length, 3);
+assert.deepStrictEqual(C.filter(e, " PUSH ").map(x => x.id), ["812"]);
+assert.deepStrictEqual(C.filter(e, "nothing"), []);
+
+console.log("test_clip: ok");
diff --git a/desktop/modules/perf/PerfModule.qml b/desktop/modules/perf/PerfModule.qml
new file mode 100644
index 0000000..d0ddf35
--- /dev/null
+++ b/desktop/modules/perf/PerfModule.qml
@@ -0,0 +1,63 @@
+// Copyright (C) 2026 Danilo M. <danix@danix.xyz>
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License version 2 as
+// published by the Free Software Foundation.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+import QtQuick
+import "../.."
+import "../../island/perf"
+
+// The island's performance panel at drawer size. Perf.qml stays in
+// island/perf and is shared: its always-on sampling already runs for the
+// island's warning dot, so this module adds no service of its own.
+Module {
+ id: mod
+
+ name: "perf"
+ label: "Performance"
+
+ // fa-tachometer, present in Inconsolata Nerd Font.
+ icon: ""
+
+ active: Perf.severity !== "ok"
+
+ tileContent: Component {
+ Row {
+ spacing: 6
+
+ Text {
+ font { family: Theme.fontFamily; pixelSize: Theme.fontSize - 4 }
+ color: Theme.subtext
+ text: "CPU " + (Perf.load === null ? "--" : Math.round(Perf.load) + "%")
+ + " · RAM " + (Perf.mem ? Math.round(100 * Perf.mem.used / Perf.mem.total) + "%" : "--")
+ }
+
+ // The same dot as the island icon. Never the accent (AGENTS.md).
+ Rectangle {
+ anchors.verticalCenter: parent.verticalCenter
+ width: 8
+ height: 8
+ radius: 4
+ visible: Perf.severity !== "ok"
+ color: Perf.severity === "crit" ? Theme.red : Theme.yellow
+ }
+ }
+ }
+
+ page: Component {
+ Page {
+ title: "Performance"
+
+ PerfPanel {
+ width: parent.width
+ }
+
+ }
+ }
+}
diff --git a/desktop/shell.qml b/desktop/shell.qml
index fd99f11..537ce71 100644
--- a/desktop/shell.qml
+++ b/desktop/shell.qml
@@ -20,9 +20,11 @@ import QtQuick
import "modules/ai"
import "modules/appearance"
import "modules/bluetooth"
+import "modules/clipboard"
import "modules/kdeconnect"
import "modules/mail"
import "modules/network"
+import "modules/perf"
import "modules/sound"
import "modules/status"
import "modules/vm"
@@ -57,10 +59,12 @@ ShellRoot {
BluetoothModule {},
KdeConnectModule {},
MailModule {},
- AppearanceModule {},
StatusModule {},
+ PerfModule {},
+ ClipboardModule {},
VmModule {},
AiModule {},
+ AppearanceModule {},
]
}