summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2026-03-02Bump version to 0.13.1HEAD0.13.1masterPaul Buetow
2026-03-02Refactor display iteration/state and harden collector runtimePaul Buetow
2026-02-18bump version to 0.13.00.13.0Paul Buetow
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18Disk I/O: collect stats on remote, dynamic bar count, reset peak on rPaul Buetow
- Add M DISKSTATS block to embedded loadbars-remote.sh so disk I/O is collected from /proc/diskstats on remote hosts (was only in scripts/ copy). - Document in countBars that total bars are computed per host (dynamic device count when disk mode is per-device). - Extend r hotkey to reset disk auto-scale peak to 1 MB/s floor when disk bars are on and diskmax is not fixed; update README and help text. Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-18fix: make disk bars visible when idle, filter zram devices, add rendering testPaul Buetow
- Draw dim purple background (#180028) instead of black so disk bar slots are visible even when the disk is idle - First sample no longer returns early; records baseline and still draws the bar background - Filter out zram devices from whole-disk detection - Add TestDiskBar_Rendering: end-to-end pixel test verifying purple bars appear after two disk data samples Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18feat: add disk I/O stats (read/write throughput bars, hotkey 5, auto-scale)Paul Buetow
Add a new disk stats category that reads /proc/diskstats, shows read/write throughput as colored bars (purple/darker purple like network RX/TX), with optional utilization % overlay in extended mode. Hotkey 5 cycles: aggregate (sum all whole-disk devices) → per-device → off. Auto-scale with decay and optional fixed override via --diskmax / diskmax config key. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18refactor: enforce Go best practices (function size, ordering, formatting)Paul Buetow
- config: split set() (62L) into setSizeAndTuning() + setDisplayFlags() - collector: split Run() (70L) into Run + startLocalScanner + startRemoteScanner + parseCollectorStream + dispatchCollectorLine; each <30L - collector: remove unused script_embed.go (RemoteScript was dead code) - display: move newRunState constructor before Run() per constructor-first rule - display: replace loadPeak IIFE with a plain initLoadPeak variable - display: split handleKey() (114L) into handleToggleKeys + handleAdjustAndSave + handleResizeKeys; add nil guard in handleResizeKeys for test safety - display: split drawNetBarSmoothed() (75L) into drawNetBarSmoothed + smoothNetUtilization + drawNetHalves; each <30L - all: gofmt -w to fix formatting drift in display and config files All tests pass (go test ./...). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-18feat: add fixed load scale (--loadmax), load peak reset (r key), update READMEPaul Buetow
- config: add LoadMax float64 field; loadmax key in ~/.loadbarsrc; written by 'w' - main: add --loadmax flag (overrides rc file when > 0) - display: newRunState initialises loadPeak from LoadMax when fixed - display: updateLoadPeak accepts loadMax param; short-circuits to fixed value when set - display: add 'r' hotkey to reset auto-scale peak to floor (2.0); no-op when fixed - tooltip: loadTooltipLines shows 'Max:' label when scale is fixed, 'Peak:' for auto - README: document 4/l load toggle, r reset, --showload, --loadmax, load average bars section; fix --cpumode entry Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-18feat: add load average bar visualization (4/l hotkey)0.12.0Paul Buetow
Adds a new teal bar type showing /proc/loadavg data per host. The 1-min average fills from the top downward; yellow and white 1px reference lines mark the 5-min and 15-min averages. A global loadPeak tracker (floor 2.0, slow per-frame decay) keeps the scale meaningful across hosts and after spikes. Toggle with 4 or l; persisted to ~/.loadbarsrc as showload=1. Bump version to 0.12.0. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-18feat: triple-toggle CPU display mode via 1 key; add tooltip, font, hit-testPaul Buetow
CPU display now cycles through three states with each press of 1: 0 = CPUModeAverage – aggregate bar only (default) 1 = CPUModeCores – individual core bars + aggregate 2 = CPUModeOff – all CPU bars hidden Config file stores cpumode=N (integer); old showcores=0/1 is read for backward compatibility. CLI flag --showcores replaced by --cpumode. Other improvements landed in this commit: - internal/display: add font.go (text rendering), hittest.go (bar hit testing), tooltip.go (mouse-over tooltip), tooltip_test.go - internal/display: mouse tracking and drawOverlay hook in display.go - internal/display: update build tags to //go:build form - internal/collector: embed remote script via script_embed.go / scriptdata/loadbars-remote.sh - internal/collector: CPULine.Total() changed to value receiver - internal/collector: table test improvements (name field, t.Run) - internal/constants: BytesPerSec consts promoted from var to const - Magefile.go: fix error formatting and install path Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-17docs: document all command-line flags in README.mdPaul Buetow
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-17Bump version to 0.11.1v0.11.1Paul Buetow
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-17Bump version to 0.11.0, change separator color to red0.11.0Paul Buetow
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17Add multi-row bar layout with maxbarsperrow config optionPaul Buetow
When monitoring many servers, bars can become too thin to read. The new maxbarsperrow setting (default 0 = unlimited) wraps bars into multiple rows of equal height when the count exceeds the limit. The last row may have fewer, wider bars filling the full window width. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17Align codebase with Go best practices (ordering and style)v0.10.1Paul Buetow
- Fix struct field alignment in Config and runState - Move parseBool() after Config methods (group methods together) - Move interface satisfaction checks after type definitions in store.go - Move linkScales var to top of display.go with other declarations - Clean up orphaned comment and blank line - Bump version to 0.10.1 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16Add toggleable host separator lines (hotkey s)Paul Buetow
Draw 1px yellow vertical lines between hosts when monitoring multiple servers, making it easy to see where one host's bars end and the next begins. Toggled with hotkey 's', persisted via 'w' to ~/.loadbarsrc. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16Display GuestNice CPU metric as lime green segment above NicePaul Buetow
Expand the smoothed CPU array from [9] to [10] elements to include GuestNice (index 9). Drawn in lime green above Nice (green) in the CPU bar stack. Rename normalizePcts9 to normalizePcts. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16Add global I/O avg line (hotkey i) and m/n hotkey aliasesPaul Buetow
Add a pink 1px line drawn from the top showing mean iowait+IRQ+softIRQ across all hosts, toggled with hotkey i and persistable to ~/.loadbarsrc. Also add m as alias for 2 (memory toggle) and n as alias for 3 (network toggle) for easier single-hand operation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16Add global average CPU line toggled with hotkey gv0.10.0Paul Buetow
Draw a 1px red horizontal line spanning the full window width showing the mean CPU usage across all monitored hosts. Toggled with 'g' hotkey and persistable to ~/.loadbarsrc via 'w'. Bump version to 0.10.0. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16Fix multi-core display bug: distribute remainder pixels evenlyv0.9.1Paul Buetow
Fixes issue where integer division (winW / numBars) left unused pixels on the right side of the window. The more cores displayed, the more obvious the gap became. Changes: - Add barBounds() helper to calculate exact position and width for each bar - Distribute remainder pixels evenly using scaled division - Update drawing functions to use pre-calculated positions - Update test to verify bars now fill entire window width Increment version to 0.9.1 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-14Aggregate all net interfaces, remove n hotkey, fix net bar decay bugv0.9.0Paul Buetow
Sum RX/TX across all non-lo interfaces instead of picking a single one. Remove the n hotkey (cycle interface), netint config field, and --netint flag since they are no longer needed. Fix pre-existing bug where net bars decayed to zero between collector updates (~19 of 20 frames had target=0, making bars invisible even during heavy downloads). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14Implement f/v hotkeys for link scale and add hotkey unit testsPaul Buetow
Add missing f/v hotkey handlers to cycle NetLink through mbit/10mbit/100mbit/gbit/10gbit, closing the gap between README documentation and actual implementation. Add 13 unit tests covering all hotkey behaviors including visual pixel assertions for toggles. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14Remove macOS stats gathering support, require Linux with /procv0.8.4Paul Buetow
Remove non-functional macOS monitoring code that used native tools (sysctl, vm_stat, netstat, iostat). Now loadbars exits with an error when attempting local stats gathering on non-Linux systems. macOS can still be used as a client to monitor remote Linux servers via SSH.
2026-02-14Replace static screenshot with animated GIF in READMEPaul Buetow
Crop window decoration borders from the recording and update the README image reference from loadbars.png to loadbars.gif. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14Add GIF recording helper script for Wayland and X11Paul Buetow
Supports Wayland (grim + slurp for frame capture) and X11 (ffmpeg x11grab + xdotool). Converts to GIF via gifski or ffmpeg palettegen fallback. Includes cleanup trap, dependency checks, and configurable duration/fps/output. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14Fix stale pixels at right edge when toggling bar layoutv0.8.3Paul Buetow
drawFrame() only cleared the window on layout changes, leaving remainder pixels (from integer division winW/numBars) with stale content from the double-buffered back buffer. Now clears every frame per SDL2 best practice. Adds comprehensive SDL visual test harness using software renderer with pixel spot-checking for CPU, memory, network bars, and the remainder bug. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14update docsPaul Buetow
2026-02-14Consolidate macOS documentation into README.md and AGENTS.mdPaul Buetow
2026-02-14Add macOS support with automatic window activationPaul Buetow
This commit adds full macOS support for loadbars, allowing it to run natively on macOS for both localhost monitoring and remote Linux hosts. Key changes: - Embed both Linux and Darwin monitoring scripts in the binary - Auto-detect localhost OS and use appropriate script - Darwin script uses native macOS tools (sysctl, vm_stat, netstat, iostat) - Remote hosts always use Linux script (assumes /proc filesystem) - Automatic window activation on macOS using build tags - No external helper scripts needed The binary now works seamlessly on macOS: - localhost monitoring uses macOS-specific commands - Remote Linux hosts work via SSH with Linux script - SDL window automatically comes to foreground on macOS - Cross-platform build with single binary for all scenarios Technical implementation: - internal/collector/script.go: Embeds both scripts - internal/collector/loadbars-remote-darwin.sh: macOS monitoring - internal/collector/loadbars-remote.sh: Linux monitoring (copied from scripts/) - internal/display/activate_darwin.go: macOS window activation - internal/display/activate.go: No-op for other platforms - Updated README.md with macOS installation instructions - Added MACOS.md with detailed macOS documentation
2026-02-14forgot .pngPaul Buetow
2026-02-14add screenshotPaul Buetow
2026-02-14remove version and some refactoringPaul Buetow
2026-02-14Bump version to 0.8.2v0.8.2Paul Buetow
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-13Bump version to 0.8.1v0.8.1Paul Buetow
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-13cleanupPaul Buetow
2026-02-13Add AGENTS.md for AI coding agents (project layout, build, display, conventions)Paul Buetow
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-13add new claudePaul Buetow
2026-02-13rename claudePaul Buetow
2026-02-13renamePaul Buetow
2026-02-13Show version in SDL window title bar (Loadbars 0.8.0)v0.8.0Paul Buetow
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-13Remove 1px gaps between bars to fix vertical line artifactsPaul Buetow
- barWidth = winW/numBars (no -1), advance x by barW only - Eliminates uncleared 1px columns that showed as vertical lines Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-13Document hotkeys in README; fix display/config; net interface helpPaul Buetow
- README: add Hotkeys section (1,2,3,e,h,n,q,w,a,y,d,c,f,v,arrows) - README: network interface and netlink config docs - Display: default window width 1200; clear bar slots to fix CPU/mem/net mixing - Display: numBars count only non-nil hosts (layout matches draw) - Display: network bars (key 3), net interface choice and n=cycle - Display: extended peak line (e), cpu/net avg keys (a,y,d,c) with feedback - Config: default barwidth 1200; netint/netlink in --help - Collector: parse_test Linux-style net stats Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-13Fix core toggle off and add memory bars (key 2)Paul Buetow
- Clear renderer every frame so toggling cores off shows single bar again - Add drawMemBar: RAM (dark grey/black) and Swap (grey/black) per host - Remove redrawBg; always clear before draw - README updates Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-13Fix hotkeys 1/2/3 and per-core displayPaul Buetow
- Collector: always send all CPU lines so key 1 can toggle per-core view - Display: use float division in drawCPUBar to avoid divide-by-zero panic - Display: count actual CPU bars for bar width so all cores fit on screen - Display: use local showMem/showNet for layout, add stdout feedback for 1/2/3 Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-13Go rewrite: loadbars with mage, default localhost, NOTICEPaul Buetow
- Module codeberg.org/snonux/loadbars, Go 1.25 - cmd/loadbars, internal/{app,config,collector,display,stats,constants,version} - SDL display, shell script for remote (no Perl), config/cluster support - Magefile: build, test, install, uninstall/deinstall - NOTICE for go-sdl2 attribution (BSD-3-Clause) - Default to localhost when no hosts given (no SSH) - Remove loadbars-go binary name; build as loadbars Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-13Remove Perl version and build files; add .gitignore for .serena/Paul Buetow
Amp-Thread-ID: https://ampcode.com/threads/T-019c58b3-06fb-733d-8fc1-f268fe7f70d5 Co-authored-by: Amp <amp@ampcode.com>
2026-02-13Revert "Replace Perl threads with fork() for multi-host monitoring"Paul Buetow
This reverts commit 79627ce3c419a6a6d6e03c83e7c62333b60345d8.
2026-02-13Replace Perl threads with fork() for multi-host monitoringPaul Buetow
Major refactoring to fix SDL threading crashes on modern Linux with sdl12-compat. Perl threads are incompatible with SDL 1.2 compatibility layer, causing segfaults in TTF_RenderText_Solid. Changes: - Replace threads::create with fork() for process-based concurrency - Implement IPC using pipes instead of threads::shared memory - Add read_from_processes() to handle pipe-based data transfer - Update signal handling for SIGTERM and SIGUSR1 in child processes - Remove all :shared attributes from variables - Update process termination to use waitpid() instead of thread joins This allows loadbars to monitor multiple remote hosts simultaneously without SDL threading conflicts. Each host runs in its own forked process with completely separate memory space. Tested successfully with 3 remote hosts on Fedora 43. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-13Rename justfile to Justfile and remove manpage generationPaul Buetow
- Rename justfile to Justfile (conventional naming) - Remove documentation target from Justfile - Deprecated manpage functionality in favor of README.md
2026-02-13Convert POD documentation to Markdown and migrate to JustfilePaul Buetow
- Convert all POD files to Markdown format - Replace Makefile with justfile for build automation - Remove deprecated Debian packaging files and related directories - Update copyright year from 2013 to 2026 in Constants.pm and loadbars - Remove obsolete docs directory (bugs, wishlist, and generated files) - Fix sum() function in Utils.pm to handle undef values properly