From 62da698c389d6b61534edcb3a7f96cac8328eb03 Mon Sep 17 00:00:00 2001 From: Egutierrez Date: Wed, 3 Jun 2026 22:29:17 +0200 Subject: [PATCH] feat: add NET graph (download/upload) to System tab MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit La pestaña Sistema ahora muestra una gráfica de red bajo DISK I/O con dos series (download en cian, upload en naranja) y las velocidades en vivo en la cabecera. Reutiliza los históricos hist.down/hist.up que ya se actualizaban cada frame para la pestaña Red, sin coste extra de muestreo. También fija own_window_type='dock' para que el WM no mueva el widget con Alt+drag y siga recibiendo clicks en las pestañas. Co-Authored-By: Claude Opus 4.8 (1M context) --- conky.conf | 4 ++-- lua/widget.lua | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/conky.conf b/conky.conf index d56debb..aa8b3bd 100644 --- a/conky.conf +++ b/conky.conf @@ -18,9 +18,9 @@ conky.config = { maximum_width = 290, minimum_height = 545, - -- Ventana (tipo 'normal' = recibe clicks; 'desktop' los ignora) ---------- + -- Ventana ('dock' = recibe clicks Y el WM no lo mueve con Alt+drag; 'normal' lo dejaba mover; 'desktop' no recibe clicks) ---------- own_window = true, - own_window_type = 'normal', + own_window_type = 'dock', own_window_argb_visual = true, own_window_transparent = true, own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager', diff --git a/lua/widget.lua b/lua/widget.lua index 3d4c7b6..66ce883 100644 --- a/lua/widget.lua +++ b/lua/widget.lua @@ -381,6 +381,14 @@ local function draw_sys(cr) gh = row("DISK I/O", str("${diskio}"), COL.orange, 26) graph(cr, x, y, gw, gh, { { data = hist.diskio, c = COL.purple, fill = true } }); y = y + gh + 6 + -- NET (red: download + upload). Dos series: down (cian) y up (naranja). + gh = row("NET", "↓ " .. str("${downspeed " .. NIF .. "}") .. + " ↑ " .. str("${upspeed " .. NIF .. "}"), COL.blue, 26) + graph(cr, x, y, gw, gh, { + { data = hist.down, c = COL.down }, + { data = hist.up, c = COL.up }, + }); y = y + gh + 6 + -- Uso de discos text(cr, x, y + 10, "USO DE DISCOS", COL.snow, 10, true); y = y + 16 local disks = { "/", "/mnt/1tb", "/mnt/2tb", "/mnt/16tb" }