Hardware management daemon and TUI for Lenovo laptops on Linux
- [2026/03] Project scaffolding complete with daemon, TUI, and IPC architecture.
Vigil is a lightweight, terminal-native hardware management tool designed specifically
for Lenovo ThinkPad and IdeaPad laptops running Linux. It provides a systemd daemon
(vigilantd) for background monitoring and a rich TUI client (vigil) built with
Bubble Tea and Lip Gloss.
Vigil gives you direct control over the hardware features that Lenovo Vantage provides on Windows — battery charge thresholds, thermal management, power profiles, keyboard backlight, display brightness, and network security — all from your terminal.
- Battery Management — Monitor charge level, health, cycle count; set charge start/stop thresholds to extend battery lifespan.
- Thermal Monitoring — Real-time CPU/GPU temperatures and fan speed; manual fan control via thinkpad_acpi.
- Power Profiles — Switch between Performance, Balanced, and Power Saver modes via platform_profile.
- Keyboard Backlight — Read and set keyboard backlight brightness.
- Display Brightness — Control screen backlight from the terminal.
- Network Security — Check WiFi connection security level via NetworkManager/D-Bus.
- Diagnostics — Quick scan of battery health, thermals, storage SMART status, and memory usage.
- Telemetry History — SQLite-backed storage of sensor readings over time.
- IPC Architecture — JSON-over-Unix-socket protocol for daemon/client communication.
- Go 1.23+
- Linux with
thinkpad_acpiorideapad_acpikernel module - systemd (for daemon management)
make buildsudo make install
sudo systemctl daemon-reload
sudo systemctl enable --now vigilantdvigilsudo systemctl disable --now vigilantd
sudo make uninstall
sudo systemctl daemon-reloadVigil is composed of two binaries:
| Binary | Description |
|---|---|
vigilantd |
Systemd daemon — polls hardware sensors, serves IPC requests, stores telemetry in SQLite |
vigil |
TUI client — connects to the daemon over a Unix socket, renders live data with Bubble Tea |
vigil/
├── cmd/vigilantd/ # Daemon entry point
├── cmd/vigil/ # CLI/TUI entry point
├── internal/
│ ├── daemon/ # Daemon lifecycle and Unix socket server
│ ├── hardware/ # sysfs/procfs/dbus hardware abstraction layer
│ ├── ipc/ # JSON-over-Unix-socket protocol and client
│ ├── store/ # SQLite telemetry storage
│ ├── poller/ # Periodic sensor polling goroutines
│ └── config/ # YAML configuration via Viper
├── tui/
│ ├── styles/ # Lip Gloss theme (dark teal)
│ └── views/ # Bubble Tea view models per tab
├── systemd/ # systemd unit file
└── Makefile
| Component | Library |
|---|---|
| TUI framework | Bubble Tea |
| TUI styling | Lip Gloss |
| TUI components | Bubbles |
| CLI framework | Cobra |
| Configuration | Viper |
| Database | modernc.org/sqlite (pure Go, no CGo) |
| D-Bus | godbus/dbus/v5 |
Contributions are welcome. Please open an issue to discuss your idea before submitting a pull request.
This project is licensed under the MIT License. See LICENSE for details.
Inspired by Lenovo Vantage and the Linux ThinkPad community. Built with the excellent Charm TUI libraries.