quickshell: server glance bars -> numbers
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
01b771b17d
commit
39b88591e8
1 changed files with 14 additions and 20 deletions
|
|
@ -1567,30 +1567,24 @@ in
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Numbers, colour-coded instead of labelled:
|
||||||
|
// blue = cpu%, cyan = ram%, grey = ping ms.
|
||||||
Column {
|
Column {
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
spacing: 4
|
spacing: 2
|
||||||
|
|
||||||
Rectangle {
|
SText {
|
||||||
width: 24; height: 3; radius: 1.5
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
color: Theme.base02
|
text: srvWidget.connected ? Math.round(srvWidget.cpu) + "%" : "--"
|
||||||
Rectangle {
|
font.pixelSize: 9
|
||||||
width: srvWidget.connected ? Math.max(2, parent.width * Math.min(1, srvWidget.cpu / 100)) : 0
|
color: srvWidget.connected ? Theme.base0D : Theme.base03
|
||||||
height: parent.height; radius: parent.radius
|
|
||||||
color: Theme.base0D
|
|
||||||
Behavior on width { NumberAnimation { duration: 300 } }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
Rectangle {
|
SText {
|
||||||
width: 24; height: 3; radius: 1.5
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
color: Theme.base02
|
text: srvWidget.connected && srvWidget.memTotal > 0
|
||||||
Rectangle {
|
? Math.round(100 * srvWidget.memUsed / srvWidget.memTotal) + "%" : "--"
|
||||||
width: srvWidget.connected && srvWidget.memTotal > 0
|
font.pixelSize: 9
|
||||||
? Math.max(2, parent.width * Math.min(1, srvWidget.memUsed / srvWidget.memTotal)) : 0
|
color: srvWidget.connected ? Theme.base0C : Theme.base03
|
||||||
height: parent.height; radius: parent.radius
|
|
||||||
color: Theme.base0C
|
|
||||||
Behavior on width { NumberAnimation { duration: 300 } }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
SText {
|
SText {
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue