quickshell: server glance sits in the theme's family
info/ok/alt were fixed blue/green/purple pulled only 25% toward the accent, so ram, down and up looked imported on any warm palette. They exist to tell six stats apart, not to warn, and their captions already say which is which — so they now tint 55% toward the accent and trade separation for family. err and warn keep the old 0.25: a critical temperature is not the place to prioritise harmony. Not hue-rotation off the accent, which was the obvious approach and is unstable: it inherits the accent's saturation, collapsing the three into near-identical greys on a muted wallpaper (minsep 0.107 on 5y39p9) and blowing them out to neon on a vivid one (0.455 on d8wxw3). Tinting holds ~0.175 on every palette tested. cpu drops the raw accent for base05 — it was the one fully saturated value in the column.
This commit is contained in:
parent
b5372d46f3
commit
7f858b2a0b
1 changed files with 30 additions and 9 deletions
|
|
@ -634,16 +634,34 @@ in
|
||||||
// pasted on. Blending toward the accent and not toward the card
|
// pasted on. Blending toward the accent and not toward the card
|
||||||
// keeps luminance roughly intact, so these stay legible as text
|
// keeps luminance roughly intact, so these stay legible as text
|
||||||
// on cardBg — mixing into the background would sink them.
|
// on cardBg — mixing into the background would sink them.
|
||||||
readonly property real statusHarmony: 0.25 // 0 = pure hue, 1 = pure accent
|
// How far each one is pulled: 0 = pure hue, 1 = pure accent.
|
||||||
function harmonised(hex) {
|
//
|
||||||
|
// Two knobs, because these colours do two different jobs. err
|
||||||
|
// and warn have to keep reading as red and amber — a critical
|
||||||
|
// temperature is not the place to prioritise harmony — so they
|
||||||
|
// stay lightly tinted. info/ok/alt only exist to tell the
|
||||||
|
// server stats apart, and at 0.25 a fixed blue, green and
|
||||||
|
// purple sat on a cream palette looking imported. Their
|
||||||
|
// captions ("ram", "↓ kb/s") already say which is which, so
|
||||||
|
// they can give up separation for family.
|
||||||
|
//
|
||||||
|
// 0.55 rather than deriving them from the accent's hue
|
||||||
|
// outright: rotating hues off the accent tracks the palette
|
||||||
|
// perfectly but inherits its saturation, which collapses the
|
||||||
|
// three into near-identical greys on a muted wallpaper and
|
||||||
|
// blows them out to neon on a vivid one. Tinting holds a
|
||||||
|
// steady separation on every palette instead.
|
||||||
|
readonly property real statusHarmony: 0.25 // err, warn
|
||||||
|
readonly property real categoryHarmony: 0.55 // info, ok, alt
|
||||||
|
function harmonised(hex, t) {
|
||||||
let h = Qt.color(hex);
|
let h = Qt.color(hex);
|
||||||
return Qt.tint(accent, Qt.rgba(h.r, h.g, h.b, 1 - statusHarmony));
|
return Qt.tint(accent, Qt.rgba(h.r, h.g, h.b, 1 - t));
|
||||||
}
|
}
|
||||||
readonly property color err: harmonised("#e0525f") // critical: temp ≥85, batt ≤15, auth failed
|
readonly property color err: harmonised("#e0525f", statusHarmony) // critical: temp ≥85, batt ≤15, auth failed
|
||||||
readonly property color warn: harmonised("#e0a44b") // caution: temp ≥70, batt ≤30
|
readonly property color warn: harmonised("#e0a44b", statusHarmony) // caution: temp ≥70, batt ≤30
|
||||||
readonly property color ok: harmonised("#68c17c") // connected / active / net down
|
readonly property color ok: harmonised("#68c17c", categoryHarmony) // connected / active / net down
|
||||||
readonly property color info: harmonised("#5aa6e0") // memory
|
readonly property color info: harmonised("#5aa6e0", categoryHarmony) // memory
|
||||||
readonly property color alt: harmonised("#b98ce0") // net up
|
readonly property color alt: harmonised("#b98ce0", categoryHarmony) // net up
|
||||||
|
|
||||||
readonly property color barBg: Qt.rgba(base00.r, base00.g, base00.b, 0.70)
|
readonly property color barBg: Qt.rgba(base00.r, base00.g, base00.b, 0.70)
|
||||||
// Card surfaces are translucent so the compositor's bar-layer
|
// Card surfaces are translucent so the compositor's bar-layer
|
||||||
|
|
@ -4420,7 +4438,10 @@ in
|
||||||
GlanceStat {
|
GlanceStat {
|
||||||
value: srvWidget.connected ? Math.round(srvWidget.cpu) + "%" : "--"
|
value: srvWidget.connected ? Math.round(srvWidget.cpu) + "%" : "--"
|
||||||
caption: "cpu"
|
caption: "cpu"
|
||||||
valueColor: srvWidget.connected ? Theme.accent : Theme.base03
|
// base05, like temp: the accent was the one fully
|
||||||
|
// saturated thing in the column, which made the
|
||||||
|
// stat the eye landed on first for no reason.
|
||||||
|
valueColor: srvWidget.connected ? Theme.base05 : Theme.base03
|
||||||
}
|
}
|
||||||
GlanceStat {
|
GlanceStat {
|
||||||
value: srvWidget.connected && srvWidget.memTotal > 0
|
value: srvWidget.connected && srvWidget.memTotal > 0
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue