From ecf306d043b62c1646a95027b4e2144be7c69178 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Fri, 16 Oct 2026 09:50:42 +0200 Subject: feat(perf): the performance page moves to the drawer, with ~/.cache The island's performance icon and panel are gone: the drawer page covers them. With only one host left, the panel drops its three-column grid for one card per row at a larger size, since the page scrolls; temperatures get a card of their own as tiles. The files move from island/perf to modules/perf. A cache card ports conky's: ~/.cache and its five largest children, measured with du each time the page opens (28ms over 2 GiB here) rather than read from conky's 15-minute sampler file. The largest is yellow, red past half the total, as conky had it. The warning dot now shows only on the drawer tile. Co-Authored-By: Claude Opus 5.5 --- desktop/island/StatusPill.qml | 57 +++++-------------------------------------- 1 file changed, 6 insertions(+), 51 deletions(-) (limited to 'desktop/island/StatusPill.qml') diff --git a/desktop/island/StatusPill.qml b/desktop/island/StatusPill.qml index 953b713..2202747 100644 --- a/desktop/island/StatusPill.qml +++ b/desktop/island/StatusPill.qml @@ -14,13 +14,11 @@ import Quickshell.Widgets import Quickshell.Services.SystemTray import QtQuick import ".." -import "perf" import "Logic.js" as Logic -// Performance icon, volume icon, tray, layout flag. The performance and -// volume icons open their panels in this capsule; -// the tray is a plain tray; the flag switches layout on scroll and ignores -// clicks. +// Volume icon, tray, layout flag. The volume icon opens its panel in this +// capsule; the tray is a plain tray; the flag switches layout on scroll and +// ignores clicks. Capsule { id: pill @@ -30,16 +28,14 @@ Capsule { property string panel: "" signal openSound() - signal openPerf() signal openDrawer() // Emitted just before a tray menu opens; the menu cannot report its close. signal menuShown() - expanded: panel === "sound" || panel === "perf" + expanded: panel === "sound" restWidth: restRow.implicitWidth + 24 - panelWidth: panel === "perf" ? 600 : 320 - panelHeight: (panel === "perf" ? (perfPanel.item ? perfPanel.item.implicitHeight : 0) - : soundPanel.implicitHeight) + 28 + panelWidth: 320 + panelHeight: soundPanel.implicitHeight + 28 Row { @@ -50,36 +46,6 @@ Capsule { visible: opacity > 0 Behavior on opacity { NumberAnimation { duration: 120 } } - // The worst severity as a dot on the corner: IconImage cannot be - // recoloured without an effect layer. Never the accent (AGENTS.md). - Item { - anchors.verticalCenter: parent.verticalCenter - width: 18 - height: 18 - - IconImage { - anchors.fill: parent - source: Quickshell.iconPath("utilities-system-monitor", true) - } - - Rectangle { - anchors { right: parent.right; top: parent.top; rightMargin: -2; topMargin: -2 } - width: 8 - height: 8 - radius: 4 - visible: Perf.severity !== "ok" - color: Perf.severity === "crit" ? Theme.red : Theme.yellow - border.width: 1 - border.color: Theme.base - } - - MouseArea { - anchors.fill: parent - cursorShape: Qt.PointingHandCursor - onClicked: pill.openPerf() - } - } - IconImage { anchors.verticalCenter: parent.verticalCenter implicitSize: 18 @@ -156,15 +122,4 @@ Capsule { Behavior on opacity { NumberAnimation { duration: 160 } } onOpenDrawer: pill.openDrawer() } - - // Loaded only while open: its models are fresh arrays every sample, and - // a hidden instance would rebuild its rows every 2s for the whole session. - Loader { - id: perfPanel - x: 14 - y: 14 - width: 600 - 28 - active: pill.panel === "perf" - sourceComponent: PerfPanel { width: 600 - 28 } - } } -- cgit v1.2.3