A lightweight TUI for viewing and switching Linux power profiles via powerprofilectl built with Go and "Bubble Tea v2".
- Displays the currently active power profile (
[*]) and available profiles ([ ]) - Switch power frofiles directly from the terminal
- Manual refresh support and clear status/error feedback
- Runs in an alternate terminal screen (
AltScreen)
- Linux with
power-profiles-daemoninstalled and running (providing thepowerprofilesctlCLI) - Go (if building directly with
go build/go run) or Nix with flakes enabled
Run directly without installing:
nix run .Or build the package:
nix build .
./result/bin/battertuiEnter the development shell (includes go, gopls, gotools, staticcheck, and power-profiles-daemon):
nix developgo run ./srcOr build a binary:
go build -o bin/battertui ./src
./bin/battertui| Key | Action |
|---|---|
up / down |
Move the cursor through available profiles |
enter / space |
Apply the selected power profile |
r |
Refresh active and available profiles |
q / ctrl+c |
Quit Battertui |
- Queries the active profile with
powerprofilesctl getand parses available profiles frompowerprofilesctl list. - Applies changes via
powerprofilesctl set <profile>and re-fetches state upon completion.
