From 36e9b00782641b9b8789f6bdb2ca2c67e4e05059 Mon Sep 17 00:00:00 2001 From: rope Date: Tue, 28 Jul 2026 15:58:06 +0100 Subject: [PATCH] quickshell: server monitor sizing, glance matches clock, bigger card type Co-Authored-By: Claude Opus 5 --- settings/quickshell.nix | 69 +++++++++++++++++++++-------------------- 1 file changed, 35 insertions(+), 34 deletions(-) diff --git a/settings/quickshell.nix b/settings/quickshell.nix index abed16c..e76b598 100644 --- a/settings/quickshell.nix +++ b/settings/quickshell.nix @@ -1478,7 +1478,7 @@ in Item { id: srvWidget width: Theme.barWidth - height: 42 + height: srvGlanceCol.height property bool connected: false property real cpu: 0 @@ -1569,21 +1569,25 @@ in // Numbers, colour-coded instead of labelled: // blue = cpu%, cyan = ram%, grey = ping ms. + // Same 15px Medium as the clock above. Column { + id: srvGlanceCol anchors.centerIn: parent - spacing: 2 + spacing: 0 SText { anchors.horizontalCenter: parent.horizontalCenter text: srvWidget.connected ? Math.round(srvWidget.cpu) + "%" : "--" - font.pixelSize: 9 + font.pixelSize: 15 + font.weight: Font.Medium color: srvWidget.connected ? Theme.base0D : Theme.base03 } SText { anchors.horizontalCenter: parent.horizontalCenter text: srvWidget.connected && srvWidget.memTotal > 0 ? Math.round(100 * srvWidget.memUsed / srvWidget.memTotal) + "%" : "--" - font.pixelSize: 9 + font.pixelSize: 15 + font.weight: Font.Medium color: srvWidget.connected ? Theme.base0C : Theme.base03 } SText { @@ -1591,7 +1595,8 @@ in text: srvWidget.pingMs < 0 ? "--" : srvWidget.pingMs < 10 ? srvWidget.pingMs.toFixed(1) : Math.round(srvWidget.pingMs).toString() - font.pixelSize: 9 + font.pixelSize: 15 + font.weight: Font.Medium color: srvWidget.pingMs < 0 ? Theme.base03 : Theme.base04 } } @@ -2491,7 +2496,7 @@ in Column { id: srvDropdownCol anchors.centerIn: parent - width: 300 + width: 340 spacing: 8 Card { @@ -2516,26 +2521,26 @@ in text: srvWidget.connected ? "up " + srvWidget.uptime + " • load " + srvWidget.load : "unreachable" - font.pixelSize: 10 + font.pixelSize: 12 color: srvWidget.connected ? Theme.base04 : Theme.base08 elide: Text.ElideRight } Row { width: parent.width - spacing: 8 - SText { width: 32; text: "cpu"; font.pixelSize: 11; color: Theme.base04; anchors.verticalCenter: parent.verticalCenter } + spacing: 10 + SText { width: 42; text: "cpu"; color: Theme.base04; anchors.verticalCenter: parent.verticalCenter } PillSlider { - width: parent.width - 32 - 64 - 16 - height: 16; trackH: 4 + width: parent.width - 42 - 76 - 20 + height: 22; trackH: 6 anchors.verticalCenter: parent.verticalCenter value: srvWidget.cpu / 100 fillColor: srvWidget.cpu >= 90 ? Theme.base08 : Theme.base0D } SText { - width: 64 + width: 76 text: srvWidget.cpu.toFixed(1) + "%" - font.pixelSize: 11 + font.weight: Font.Medium horizontalAlignment: Text.AlignRight anchors.verticalCenter: parent.verticalCenter } @@ -2543,19 +2548,19 @@ in Row { width: parent.width - spacing: 8 - SText { width: 32; text: "ram"; font.pixelSize: 11; color: Theme.base04; anchors.verticalCenter: parent.verticalCenter } + spacing: 10 + SText { width: 42; text: "ram"; color: Theme.base04; anchors.verticalCenter: parent.verticalCenter } PillSlider { - width: parent.width - 32 - 64 - 16 - height: 16; trackH: 4 + width: parent.width - 42 - 76 - 20 + height: 22; trackH: 6 anchors.verticalCenter: parent.verticalCenter value: srvWidget.memTotal > 0 ? srvWidget.memUsed / srvWidget.memTotal : 0 fillColor: Theme.base0C } SText { - width: 64 + width: 76 text: srvWidget.memUsed.toFixed(1) + "/" + Math.round(srvWidget.memTotal) + "G" - font.pixelSize: 11 + font.weight: Font.Medium horizontalAlignment: Text.AlignRight anchors.verticalCenter: parent.verticalCenter } @@ -2563,11 +2568,11 @@ in Row { width: parent.width - spacing: 8 - SText { width: 32; text: "ping"; font.pixelSize: 11; color: Theme.base04 } + spacing: 10 + SText { width: 42; text: "ping"; color: Theme.base04 } SText { text: srvWidget.pingMs < 0 ? "--" : srvWidget.pingMs.toFixed(1) + " ms" - font.pixelSize: 11 + font.weight: Font.Medium color: srvWidget.pingMs < 0 ? Theme.base03 : Theme.base05 } } @@ -2588,14 +2593,14 @@ in Row { width: parent.width - SText { width: parent.width - 88; text: "name"; font.pixelSize: 10; color: Theme.base03 } - SText { width: 44; text: "cpu%"; font.pixelSize: 10; color: Theme.base03; horizontalAlignment: Text.AlignRight } - SText { width: 44; text: "mem%"; font.pixelSize: 10; color: Theme.base03; horizontalAlignment: Text.AlignRight } + SText { width: parent.width - 112; text: "name"; font.pixelSize: 11; color: Theme.base03 } + SText { width: 56; text: "cpu%"; font.pixelSize: 11; color: Theme.base03; horizontalAlignment: Text.AlignRight } + SText { width: 56; text: "mem%"; font.pixelSize: 11; color: Theme.base03; horizontalAlignment: Text.AlignRight } } Column { width: parent.width - spacing: 2 + spacing: 3 Repeater { model: srvWidget.procs @@ -2603,27 +2608,24 @@ in Row { required property var modelData width: parent.width - height: 17 + height: 21 SText { - width: parent.width - 88 + width: parent.width - 112 text: modelData.name - font.pixelSize: 11 elide: Text.ElideRight anchors.verticalCenter: parent.verticalCenter } SText { - width: 44 + width: 56 text: modelData.cpu.toFixed(1) - font.pixelSize: 11 horizontalAlignment: Text.AlignRight color: modelData.cpu >= 100 ? Theme.base08 : modelData.cpu >= 25 ? Theme.base0A : Theme.base05 anchors.verticalCenter: parent.verticalCenter } SText { - width: 44 + width: 56 text: modelData.mem.toFixed(1) - font.pixelSize: 11 horizontalAlignment: Text.AlignRight color: Theme.base04 anchors.verticalCenter: parent.verticalCenter @@ -2634,7 +2636,6 @@ in SText { visible: srvWidget.procs.length === 0 text: "no data" - font.pixelSize: 11 color: Theme.base03 } }