From 39b88591e8c6eeeb4eb56c271a3b10c48fdb17e4 Mon Sep 17 00:00:00 2001 From: rope Date: Tue, 28 Jul 2026 15:54:24 +0100 Subject: [PATCH] quickshell: server glance bars -> numbers Co-Authored-By: Claude Opus 5 --- settings/quickshell.nix | 34 ++++++++++++++-------------------- 1 file changed, 14 insertions(+), 20 deletions(-) diff --git a/settings/quickshell.nix b/settings/quickshell.nix index 92093a4..abed16c 100644 --- a/settings/quickshell.nix +++ b/settings/quickshell.nix @@ -1567,30 +1567,24 @@ in }); } + // Numbers, colour-coded instead of labelled: + // blue = cpu%, cyan = ram%, grey = ping ms. Column { anchors.centerIn: parent - spacing: 4 + spacing: 2 - Rectangle { - width: 24; height: 3; radius: 1.5 - color: Theme.base02 - Rectangle { - width: srvWidget.connected ? Math.max(2, parent.width * Math.min(1, srvWidget.cpu / 100)) : 0 - height: parent.height; radius: parent.radius - color: Theme.base0D - Behavior on width { NumberAnimation { duration: 300 } } - } + SText { + anchors.horizontalCenter: parent.horizontalCenter + text: srvWidget.connected ? Math.round(srvWidget.cpu) + "%" : "--" + font.pixelSize: 9 + color: srvWidget.connected ? Theme.base0D : Theme.base03 } - Rectangle { - width: 24; height: 3; radius: 1.5 - color: Theme.base02 - Rectangle { - width: srvWidget.connected && srvWidget.memTotal > 0 - ? Math.max(2, parent.width * Math.min(1, srvWidget.memUsed / srvWidget.memTotal)) : 0 - height: parent.height; radius: parent.radius - color: Theme.base0C - Behavior on width { NumberAnimation { duration: 300 } } - } + SText { + anchors.horizontalCenter: parent.horizontalCenter + text: srvWidget.connected && srvWidget.memTotal > 0 + ? Math.round(100 * srvWidget.memUsed / srvWidget.memTotal) + "%" : "--" + font.pixelSize: 9 + color: srvWidget.connected ? Theme.base0C : Theme.base03 } SText { anchors.horizontalCenter: parent.horizontalCenter