From bf1ed23d4ff497e3a8972de9534ad96e2dfa5074 Mon Sep 17 00:00:00 2001 From: rope Date: Tue, 28 Jul 2026 20:14:28 +0100 Subject: [PATCH] quickshell: glance gets cpu/ram captions, ms under ping Co-Authored-By: Claude Opus 5 --- settings/quickshell.nix | 76 +++++++++++++++++++++++++++++------------ 1 file changed, 54 insertions(+), 22 deletions(-) diff --git a/settings/quickshell.nix b/settings/quickshell.nix index 3d9695e..306cacc 100644 --- a/settings/quickshell.nix +++ b/settings/quickshell.nix @@ -1827,37 +1827,69 @@ in }); } - // Numbers, colour-coded instead of labelled: - // blue = cpu%, cyan = ram%, grey = ping ms. - // Same 15px Medium as the clock above. + // Labelled numbers, 15px Medium like the clock: + // "cpu"/"ram" captions above their values, faded "ms" + // under the ping. Column { id: srvGlanceCol anchors.centerIn: parent - spacing: 0 + spacing: 5 - SText { + Column { anchors.horizontalCenter: parent.horizontalCenter - text: srvWidget.connected ? Math.round(srvWidget.cpu) + "%" : "--" - font.pixelSize: 15 - font.weight: Font.Medium - color: srvWidget.connected ? Theme.base0D : Theme.base03 + spacing: 0 + SText { + anchors.horizontalCenter: parent.horizontalCenter + text: "cpu" + font.pixelSize: 9 + color: Theme.base03 + } + SText { + anchors.horizontalCenter: parent.horizontalCenter + text: srvWidget.connected ? Math.round(srvWidget.cpu) + "%" : "--" + font.pixelSize: 15 + font.weight: Font.Medium + color: srvWidget.connected ? Theme.base0D : Theme.base03 + } } - SText { + + Column { anchors.horizontalCenter: parent.horizontalCenter - text: srvWidget.connected && srvWidget.memTotal > 0 - ? Math.round(100 * srvWidget.memUsed / srvWidget.memTotal) + "%" : "--" - font.pixelSize: 15 - font.weight: Font.Medium - color: srvWidget.connected ? Theme.base0C : Theme.base03 + spacing: 0 + SText { + anchors.horizontalCenter: parent.horizontalCenter + text: "ram" + font.pixelSize: 9 + color: Theme.base03 + } + SText { + anchors.horizontalCenter: parent.horizontalCenter + text: srvWidget.connected && srvWidget.memTotal > 0 + ? Math.round(100 * srvWidget.memUsed / srvWidget.memTotal) + "%" : "--" + font.pixelSize: 15 + font.weight: Font.Medium + color: srvWidget.connected ? Theme.base0C : Theme.base03 + } } - SText { + + Column { anchors.horizontalCenter: parent.horizontalCenter - text: srvWidget.pingMs < 0 ? "--" - : srvWidget.pingMs < 10 ? srvWidget.pingMs.toFixed(1) - : Math.round(srvWidget.pingMs).toString() - font.pixelSize: 15 - font.weight: Font.Medium - color: srvWidget.pingMs < 0 ? Theme.base03 : Theme.base04 + spacing: 0 + SText { + anchors.horizontalCenter: parent.horizontalCenter + text: srvWidget.pingMs < 0 ? "--" + : srvWidget.pingMs < 10 ? srvWidget.pingMs.toFixed(1) + : Math.round(srvWidget.pingMs).toString() + font.pixelSize: 15 + font.weight: Font.Medium + color: srvWidget.pingMs < 0 ? Theme.base03 : Theme.base04 + } + SText { + anchors.horizontalCenter: parent.horizontalCenter + text: "ms" + font.pixelSize: 9 + color: Theme.base03 + } } }