From 5013893b4cbb63277b2a4c92a0dc8b851816aa93 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Thu, 17 Sep 2026 12:27:28 +0200 Subject: feat: add the disks and cache cards disks draws a ring per filesystem from the df sample, with the NFS server address read from the device field and a labelled-bar fallback when the rings would be too small to read. cache shows the ~/.cache total and its four largest children from the du sample. card.ring now resets the cairo path first: a preceding card.text() leaves a current point, and cairo_arc() joins to it with a straight line, so the disks rings were drawn with stray chords. The ring primitive had no caller until now, which is why it went unnoticed. --- lib/card.lua | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib') diff --git a/lib/card.lua b/lib/card.lua index 8e04e0b..48a7f2e 100644 --- a/lib/card.lua +++ b/lib/card.lua @@ -184,6 +184,10 @@ function M.ring(cr, cx, cy, r, frac, colour, colors, width) if frac < 0 then frac = 0 elseif frac > 1 then frac = 1 end width = width or math.max(3, r * 0.18) + -- Start a fresh path. A preceding card.text() leaves a current point behind, + -- and cairo_arc() joins to it with a straight line, so without this every + -- ring after a label is drawn with a stray chord to the text baseline. + cairo_new_path(cr) cairo_set_line_width(cr, width) cairo_set_line_cap(cr, CAIRO_LINE_CAP_ROUND) -- cgit v1.2.3