Minimal Steam Controller 2 / puck battery reader for Linux.
Scans /dev for matching Valve hidraw devices and prints the first battery
report received:
hidrawX level_percent
Example:
hidraw7 83
The latest release provides statically linked Linux binaries for x86-64 and
ARM64. Check your architecture with uname -m, then download the matching
files.
For x86-64 (x86_64):
curl -fLO https://github.com/gregdel/scbat/releases/latest/download/scbat_linux_amd64
curl -fLO https://github.com/gregdel/scbat/releases/latest/download/scbat_linux_amd64.sha256sum
sha256sum -c scbat_linux_amd64.sha256sum
install -Dm755 scbat_linux_amd64 ~/.local/bin/scbatFor ARM64 (aarch64 or arm64):
curl -fLO https://github.com/gregdel/scbat/releases/latest/download/scbat_linux_arm64
curl -fLO https://github.com/gregdel/scbat/releases/latest/download/scbat_linux_arm64.sha256sum
sha256sum -c scbat_linux_arm64.sha256sum
install -Dm755 scbat_linux_arm64 ~/.local/bin/scbatEach push to master creates a release named with its UTC build time and marks
it as the latest release.
makeThe Makefile uses Zig's C compiler to produce a stripped, statically linked
x86-64 Linux binary named scbat by default. Set TARGET to another Zig target
to cross-compile for a different architecture. For example, build an ARM64
Linux binary without replacing the default output:
make TARGET=aarch64-linux-musl OUTPUT=scbat-arm64./scbatFor a WM bar:
scbat | cut -d' ' -f2On Arch Linux, install the steam-devices
package to grant logged-in users access to Valve HID devices:
sudo pacman -S steam-devicesReconnect the controller or puck after installing the package.
When no supported device or battery report is available, scbat prints
nothing and exits with status 1.