repositories / dotfiles

dotfiles

bugabingas dorkfiles

owned by bugabinga

feat(system): golden-ratio cards + denser, wider sparklines

226886218930188e775b62f3f7b98ea605f2ccc3

Oliver Jan Krylow <oliver@bugabinga.net> ·

unsigned

Browse filesCompare with HEAD

- Split the two cards on the golden ratio (machine 0.382 / live 0.618)
  so the live data gets the larger share.
- Widen sparklines 104->176px, halve the bar pitch (3->2px, touching
  bars) so each reads as a mini area-chart, and raise the ring cap
  32->96 (~3 min of history at 2s/sample) to feed the extra width.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

Changed files (2)

+15 / −11 text lines

Diff layout

quickshell/nuguland/PopoutHost.qml

Modified

+12 / −9 text lines

712712 }
714 // ---- two equal rounded cards: identity | live ----
714 // ---- two rounded cards: identity | live, split on the golden ratio
715 // (live gets the larger ~0.618 share — that's where the live data lives) ----
715716 Row {
716717 id: cardRow
718 readonly property real cardW: Math.max(1, (width - spacing) / 2)
719 readonly property real avail: Math.max(1, width - spacing)
720 readonly property real machineW: avail * 0.382
721 readonly property real liveW: avail * 0.618
720723 width: parent.width
721724 height: 292
724727 // ===== MACHINE IDENTITY =====
725728 Rectangle {
726 width: cardRow.cardW
729 width: cardRow.machineW
727730 height: cardRow.height
728731 radius: 14
729732 color: root.theme ? root.theme.withAlpha(root.theme.ui.backdrop, 0.55) : "#242424"
827830 // ===== LIVE STATS =====
828831 Rectangle {
829 width: cardRow.cardW
832 width: cardRow.liveW
830833 height: cardRow.height
831834 radius: 14
832835 color: root.theme ? root.theme.withAlpha(root.theme.ui.backdrop, 0.55) : "#242424"
13721375 // window-max for unbounded metrics (net/disk). Keeps bars consistent with the fill-bar.
13731376 property real scaleMax: 0
1375 // keep a constant 2px bar pitch; show only the most recent samples that fit
1376 readonly property int shown: Math.max(1, Math.floor(width / 3))
1378 // dense 2px pitch (touching bars); show the most recent samples that fit
1379 readonly property int shown: Math.max(1, Math.floor(width / 2))
13771380 readonly property var slice: {
13781381 const v = spark.values || [];
13791382 return v.length > spark.shown ? v.slice(v.length - spark.shown) : v;
13911394 anchors.right: parent.right
13921395 anchors.bottom: parent.bottom
13931396 height: parent.height
1394 spacing: 1
1397 spacing: 0
13961399 Repeater {
13971400 model: spark.slice
14671470 values: mrow.ring
14681471 scaleMax: mrow.sparkScaleMax
14691472 barColor: mrow.barColor
1470 width: 104
1471 height: 22
1473 width: 176
1474 height: 24
14741477 Rectangle {

quickshell/nuguland/Resources.qml

Modified

+3 / −2 text lines

3535 property real loadFifteen: 0
3636 property int cores: 1
38 // --- ring buffers (cap 32) for sparklines ---
39 readonly property int ringCap: 32
38 // --- ring buffers for sparklines (cap = max samples a wide spark shows;
39 // 96 × 2s ≈ 3 min of history) ---
40 readonly property int ringCap: 96
4041 property var cpuRing: []
4142 property var memRing: []
4243 property var tempRing: []