Skip to content

arryllopez/vigil

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vigil

Go Report Card License: MIT


Vigil

Hardware management daemon and TUI for Lenovo laptops on Linux

Latest News

  • [2026/03] Project scaffolding complete with daemon, TUI, and IPC architecture.

Overview

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.

Features

  • 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.

Getting Started

Prerequisites

  • Go 1.23+
  • Linux with thinkpad_acpi or ideapad_acpi kernel module
  • systemd (for daemon management)

Build

make build

Install

sudo make install
sudo systemctl daemon-reload
sudo systemctl enable --now vigilantd

Run the TUI

vigil

Uninstall

sudo systemctl disable --now vigilantd
sudo make uninstall
sudo systemctl daemon-reload

Architecture

Vigil 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

Project Structure

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

Tech Stack

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

Contributing

Contributions are welcome. Please open an issue to discuss your idea before submitting a pull request.

License

This project is licensed under the MIT License. See LICENSE for details.

Acknowledgement

Inspired by Lenovo Vantage and the Linux ThinkPad community. Built with the excellent Charm TUI libraries.

About

lenovo vantage for linux distributions

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors