diff options
| author | Danilo M. <danix@danix.xyz> | 2026-10-16 09:50:42 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-10-16 09:50:42 +0200 |
| commit | ecf306d043b62c1646a95027b4e2144be7c69178 (patch) | |
| tree | a6671d804040f7563ebee9c2e05c6e344918ceef /desktop/island/StatusPill.qml | |
| parent | dc8c94052e491f7cb1d1f8095afbcee574510d42 (diff) | |
| download | quickshell-ecf306d043b62c1646a95027b4e2144be7c69178.tar.gz quickshell-ecf306d043b62c1646a95027b4e2144be7c69178.zip | |
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 <noreply@anthropic.com>
Diffstat (limited to 'desktop/island/StatusPill.qml')
| -rw-r--r-- | desktop/island/StatusPill.qml | 57 |
1 files changed, 6 insertions, 51 deletions
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 } - } } |
