quickshell: glance gets cpu/ram captions, ms under ping
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
ee86678cb5
commit
bf1ed23d4f
1 changed files with 54 additions and 22 deletions
|
|
@ -1827,14 +1827,23 @@ in
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// Numbers, colour-coded instead of labelled:
|
// Labelled numbers, 15px Medium like the clock:
|
||||||
// blue = cpu%, cyan = ram%, grey = ping ms.
|
// "cpu"/"ram" captions above their values, faded "ms"
|
||||||
// Same 15px Medium as the clock above.
|
// under the ping.
|
||||||
Column {
|
Column {
|
||||||
id: srvGlanceCol
|
id: srvGlanceCol
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
spacing: 0
|
spacing: 5
|
||||||
|
|
||||||
|
Column {
|
||||||
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
spacing: 0
|
||||||
|
SText {
|
||||||
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
text: "cpu"
|
||||||
|
font.pixelSize: 9
|
||||||
|
color: Theme.base03
|
||||||
|
}
|
||||||
SText {
|
SText {
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
text: srvWidget.connected ? Math.round(srvWidget.cpu) + "%" : "--"
|
text: srvWidget.connected ? Math.round(srvWidget.cpu) + "%" : "--"
|
||||||
|
|
@ -1842,6 +1851,17 @@ in
|
||||||
font.weight: Font.Medium
|
font.weight: Font.Medium
|
||||||
color: srvWidget.connected ? Theme.base0D : Theme.base03
|
color: srvWidget.connected ? Theme.base0D : Theme.base03
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Column {
|
||||||
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
spacing: 0
|
||||||
|
SText {
|
||||||
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
text: "ram"
|
||||||
|
font.pixelSize: 9
|
||||||
|
color: Theme.base03
|
||||||
|
}
|
||||||
SText {
|
SText {
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
text: srvWidget.connected && srvWidget.memTotal > 0
|
text: srvWidget.connected && srvWidget.memTotal > 0
|
||||||
|
|
@ -1850,6 +1870,11 @@ in
|
||||||
font.weight: Font.Medium
|
font.weight: Font.Medium
|
||||||
color: srvWidget.connected ? Theme.base0C : Theme.base03
|
color: srvWidget.connected ? Theme.base0C : Theme.base03
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Column {
|
||||||
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
spacing: 0
|
||||||
SText {
|
SText {
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
text: srvWidget.pingMs < 0 ? "--"
|
text: srvWidget.pingMs < 0 ? "--"
|
||||||
|
|
@ -1859,6 +1884,13 @@ in
|
||||||
font.weight: Font.Medium
|
font.weight: Font.Medium
|
||||||
color: srvWidget.pingMs < 0 ? Theme.base03 : Theme.base04
|
color: srvWidget.pingMs < 0 ? Theme.base03 : Theme.base04
|
||||||
}
|
}
|
||||||
|
SText {
|
||||||
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
text: "ms"
|
||||||
|
font.pixelSize: 9
|
||||||
|
color: Theme.base03
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue