diff options
Diffstat (limited to 'desktop/island')
| -rw-r--r-- | desktop/island/Island.qml | 7 | ||||
| -rw-r--r-- | desktop/island/README.md | 40 | ||||
| -rw-r--r-- | desktop/island/StatusPill.qml | 57 |
3 files changed, 12 insertions, 92 deletions
diff --git a/desktop/island/Island.qml b/desktop/island/Island.qml index 1807c82..8532652 100644 --- a/desktop/island/Island.qml +++ b/desktop/island/Island.qml @@ -28,8 +28,8 @@ PanelWindow { screen: Quickshell.screens.find(s => s.name === "DP-1") ?? Quickshell.screens[0] anchors { top: true; left: true; right: true } - // Tall enough for the largest panel, the performance grid; the mask keeps - // everything outside the pills click-through. + // Tall enough for the largest panel; the mask keeps everything outside + // the pills click-through. implicitHeight: 480 color: "transparent" exclusionMode: ExclusionMode.Ignore @@ -38,7 +38,7 @@ PanelWindow { WlrLayershell.namespace: "quickshell-island" WlrLayershell.keyboardFocus: panel !== "" ? WlrKeyboardFocus.OnDemand : WlrKeyboardFocus.None - // "", "sound", "perf" or "calendar". + // "", "sound" or "calendar". property string panel: "" // --- reveal and hide ------------------------------------------------- @@ -212,6 +212,5 @@ PanelWindow { onMenuShown: win.menuHeld = true onOpenSound: win.panel = win.panel === "sound" ? "" : "sound" onOpenDrawer: { win.panel = ""; win.drawer.show("sound"); } - onOpenPerf: win.panel = win.panel === "perf" ? "" : "perf" } } diff --git a/desktop/island/README.md b/desktop/island/README.md index 4ad1050..c202e61 100644 --- a/desktop/island/README.md +++ b/desktop/island/README.md @@ -46,10 +46,10 @@ is open or not. Click opens the calendar panel. ## Status pill -Left to right: performance icon, volume icon, tray, layout flag. +Left to right: volume icon, tray, layout flag. The performance panel that +used to open from here is the drawer's Performance page now +(`desktop/modules/perf/`). -- **Performance icon** opens the performance panel, see below. A dot on its - corner warns when something needs attention. - **Volume icon** shows the default sink (muted, low, medium, high). Click opens the sound panel. - **Tray** shows `SystemTray` items. Left click activates, right click opens @@ -68,40 +68,6 @@ alone opens the drawer instead. `Prefs.qml` keeps only the pinned IP; a `controls` key left in `desktop.json` by the old panel is kept on write and otherwise ignored. -## Performance panel - -The system monitor icon, first in the status pill, opens a card grid of the -figures the conky dashboard used to show: CPU load with a bar per core, the -CPU model, RAM and five temperatures; the Arc B580's temperatures, VRAM and -fan (no utilisation, xe exposes none); download and upload over the last -minute, the LAN address and the public IP; and the five mounts with their -usage. `perf/Perf.qml` reads them; `perf/Perf.js` holds the parsing, tested by -`node desktop/island/perf/test_perf.js`. - -A dot on the icon shows the worst of these, yellow or red: - -| Input | Yellow | Red | -| --- | --- | --- | -| each temperature | its warn | its crit | -| RAM | 85% | 95% | -| each disk | 90% | 95% | -| public IP | | differs from the pinned one | - -CPU load is left out, since spikes would flicker it. There is no hysteresis, -so a sensor sitting on its threshold can toggle the dot. The pin beside the -public IP stores the address shown as `perf.pinnedIp` in -`$XDG_STATE_HOME/quickshell/desktop.json`; the check exists because the VPN -into the LAN depends on the ISP's fixed address. The fetch is -`curl -4 https://ipinfo.io/ip` every 30 minutes from the last attempt, into -`~/.cache/udt/pubip.txt`, the file conky's sampler used. A failed fetch is -never a mismatch: the old value goes stale after 4 hours and shows as a dash. - -CPU, RAM, temperatures and disks are sampled always, so the dot works with -the panel closed. Per-core load, the network rate, VRAM (a scan of every -fdinfo, ~14ms) and the fan run only while the panel is open, and the panel -itself is loaded only then. The mount list, `br0`, the GPU name and the -12 GiB VRAM size are constants in `Perf.qml`. - ## Calendar panel The clock pill opens a month grid beside the selected day's agenda. Dots 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 } - } } |
