Monitor Widgets — btop-style live widgets for LightGUI

Monitor Widgets — btop-style live widgets for LightGUI

Monitor widgets are LightGUI's btop-style live widgets: fifteen XFrame widgets for building system monitors, dashboards and status boards — scrolling graphs, gauges, bars, a process table, a load badge, and buttons that watch a process, a systemd unit or a TCP port and glow green or red with the answer.

btop running, the inspiration for the monitor widgets
btop — the inspiration: live graphs, per-core grids and resource boxes in one screen. The widgets below rebuild those pieces as LightGUI widgets.

Every widget is a plain XFrame widget: construct it, feed it values, draw it. Your app does no hand-rolled drawing — the widgets do that — and each widget ships with a working example in examples/<Name>.cpp that builds, runs and is screenshotted under Xvfb.

The fifteen widgets

WidgetWhat it does
XHistoryGraphScrolling multi-series time-series line graph.
XCoreGridA grid of mini history graphs, one per CPU core.
XNetGraphDual up/down scrolling graph with current rates and totals.
XTempHistoryTemperature history with a threshold line and over-temp colouring.
XUsageBarHorizontal gradient usage bar with label and percentage text.
XStackBarStacked multi-segment bar (used/cached/buffers/free) with a legend.
XVerticalBarVertical bar meter with a scale and a peak-hold marker.
XTachometerRound tachometer: needle, redline zone, digital readout, peak hold.
XArcGaugeSemicircular arc gauge with coloured zones and a big percentage in the middle.
XDonutGaugeCircular progress ring with the percentage centred.
XProcessListLive process table: sortable columns, in-cell CPU% bars, colour-coded rows, auto-refresh.
XLoadBadgeLoad-average badge (1/5/15 min) with colour thresholds and uptime.
XMonitorButtonA button that IS a live monitor: process, systemd unit, or TCP port.
XMonitorGridA panel of XMonitorButtons in a labelled grid, on one shared poll timer.
XSysBoxComposite resource box: title, big number, history graph, usage bar.

Build a dashboard

One XSysBox per resource (CPU, MEM, NET), a XHistoryGraph for the trends, an XCoreGrid for the cores, and an XMonitorGrid for the services — that is a btop screen made of widgets. Each widget's own page has its methods and a working snippet.

Ports

All fifteen widgets exist in C, Rust and Python under the same names.

Get the code

These widgets ship in all three LightGUI repos:

Linux Rocks Every Day
Source code: LightGUI (C) · LightGUI (Rust) · LightGUI (Python)