Major changes: - Converted all cobra commands from global variables to CLI struct methods - Eliminated global logger variable in favor of dependency injection - Fixed all errcheck linter issues by properly handling errors - Fixed Makefile to check formatting instead of modifying files - Integrated smartconfig library for configuration management - Added CLAUDE.md with project-specific development guidelines Key improvements: - All commands (daemon, install, status, info) now use CLI struct methods - Logger is injected as dependency through fx providers - Proper error handling for all DrawText and file.Close() calls - Configuration loading now uses smartconfig with proper defaults - Fixed formatting check in Makefile (make test no longer modifies files) Technical details: - Created CLI struct with log field (renamed from logger per request) - All command constructors return *cobra.Command from CLI methods - Config package uses smartconfig.NewFromAppName() correctly - Fixed all critical errcheck issues throughout the codebase - Maintained backward compatibility with existing functionality All tests passing, code formatted, and ready for deployment. |
||
---|---|---|
cmd/hdmistat | ||
internal | ||
.gitignore | ||
.golangci.yml | ||
CLAUDE.md | ||
DESIGN.md | ||
go.mod | ||
go.sum | ||
Makefile | ||
README.md |
hdmistat
A beautiful system statistics display daemon for Linux framebuffers. Perfect for Raspberry Pis and other headless systems.
Features
- 🖥️ Direct framebuffer rendering (no X11/Wayland required)
- 📊 Real-time system statistics (CPU, memory, disk, network)
- 🎨 Beautiful typography using IBM Plex Mono
- 🔄 Configurable screen carousel
- 🚀 Lightweight and efficient
- 🔧 Easy systemd integration
Installation
go install git.eeqj.de/sneak/hdmistat/cmd/hdmistat@latest
sudo hdmistat install
Usage
Run as daemon
sudo hdmistat daemon
Install systemd service
sudo hdmistat install
Check status
hdmistat status
Display system info
hdmistat info
Configuration
Create /etc/hdmistat/config.yaml
:
framebuffer: /dev/fb0
rotation_interval: 10s
screens:
- overview
- top_cpu
- top_memory
- network_detail
Building from Source
git clone https://git.eeqj.de/sneak/hdmistat
cd hdmistat
make build
Requirements
- Linux with framebuffer support
- Go 1.21+
- Root access for framebuffer device
License
MIT License
Copyright (c) 2024
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Author
Made with love and lots of expensive SOTA AI by sneak in Berlin in the summer of 2025.
Released as a free software gift to the world, no strings attached, under the WTFPL license.
Contact: sneak@sneak.berlin
https://keys.openpgp.org/vks/v1/by-fingerprint/5539AD00DE4C42F3AFE11575052443F4DF2A55C2