A lightweight, fast, native Linux GUI for checking your laptop battery
info. Written in C with GTK4 and libadwaita, it shows organized battery
statistics read directly from the Linux power_supply sysfs interface
(/sys/class/power_supply) - no root, no sudo, no background daemon.
- No Qt, no Electron, no Python, no webview.
- Reads world-readable sysfs files, so it never needs elevated privileges.
- Starts quickly and uses minimal memory.
- Works on any Linux laptop, not a specific vendor.
- Auto-detects every battery under
/sys/class/power_supply(laptop packs likeBAT0/BAT1, and even peripherals such as wireless mice). - Tags each battery as System or Device and lets you switch between them with a dropdown when more than one is present.
- Organized sections: Overview, Health, Energy / Charge, Power, Hardware.
- Any sysfs value that does not exist is shown as N/A (no crashes).
- Follows your system light/dark theme automatically (via libadwaita).
- Refresh button and an optional Auto 30s auto-refresh toggle.
- Converts raw micro-units into human-readable values:
voltage_nowuV -> Vpower_nowuW -> Wcurrent_nowuA -> Aenergy_*uWh -> Whcharge_*uAh -> Ah
- Computes battery health % as
energy_full / energy_full_design * 100(falls back to thecharge_*pair). Values slightly above 100% are shown as-is, since freshly-calibrated packs can reportenergy_fullabove the design value. - Shows charge-control thresholds when the kernel/driver exposes them.
Clone or download this project, then run the installer:
./install.shIt will:
- Check for the GTK4 development files, a C compiler,
make, andpkg-config. If any are missing, it installs them using your distro's package manager (this one step asks for sudo). - Build
minusb. - Install the binary into
~/.local/bin/minusband a launcher into~/.local/share/applications/.
After it finishes, minusb appears in your applications menu (under
Utility/System). You can also launch it from a terminal with minusb.
If the installer warns that ~/.local/bin is not on your PATH, add this to
your shell config (e.g. ~/.bashrc or ~/.zshrc):
export PATH="$HOME/.local/bin:$PATH"./uninstall.shThis removes the binary and the launcher from ~/.local. (make uninstall
does the same thing if you prefer.)
If you prefer to install dependencies and build manually, see BUILD.md for per-distro instructions.
The Linux kernel exposes battery data through the power_supply class in
sysfs (/sys/class/power_supply/BAT0/...). These attribute files are
world-readable, so any unprivileged user can read capacity, status,
energy_now, voltage_now, and so on. minusb only reads those files, so it
never needs root, sudo, or any helper daemon. (Many battery-inspection tools
require root; minusb does not.)
Root is only required to write certain attributes (for example changing a charge threshold) or to access vendor/ACPI/EC registers directly. minusb does none of that.
Some details that other battery tools display are not exposed as plain, unprivileged sysfs attributes, so they appear as N/A here (or are simply omitted):
- Battery temperature - often only available via
hwmonnodes or the embedded controller, frequently requiring root or driver-specific access. - Manufacture date / first-use date - read from the SMBus/embedded controller by vendor utilities, not from standard sysfs.
- Vendor diagnostics & detailed pack data - exposed through ACPI calls,
SMBus, or
smartctl-style tooling rather thanpower_supplysysfs. - Force discharge / recalibration controls - write-only operations that require root and specific driver support.
current_now/charge_*on packs that report the energy model: many laptops exposeenergy_now/power_nowinstead ofcharge_now/current_now. minusb automatically displays whichever set the battery provides.
capacity, capacity_level, status, cycle_count, manufacturer,
model_name, serial_number, technology, energy_now, energy_full,
energy_full_design, charge_now, charge_full, charge_full_design,
power_now, current_now, voltage_now,
charge_control_start_threshold, charge_control_end_threshold.
.
├── src/main.c # entire app (single file)
├── Makefile # build + install/uninstall
├── install.sh # one-command installer
├── uninstall.sh # one-command uninstaller
├── data/io.github.gabrielbotandev.minusb.desktop # menu launcher
├── README.md
└── BUILD.md # build-from-source guide
Licensed under the MIT License; see LICENSE.