diff options
| author | Danilo M. <danix@danix.xyz> | 2026-09-17 12:27:28 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-09-17 12:27:28 +0200 |
| commit | 5013893b4cbb63277b2a4c92a0dc8b851816aa93 (patch) | |
| tree | a0cd680dccee25b41e9f3b6a51c5ba284b7d7669 /lib | |
| parent | d9c68ef7a62b45527cfb87d61e51866c5e2931a3 (diff) | |
| download | conky-theme-udt-5013893b4cbb63277b2a4c92a0dc8b851816aa93.tar.gz conky-theme-udt-5013893b4cbb63277b2a4c92a0dc8b851816aa93.zip | |
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.
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/card.lua | 4 |
1 files changed, 4 insertions, 0 deletions
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) |
