Skip to content
MaxChip101Public

About

A simple TUI made for managing power profiles with powerprofilectl

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

15 Commits

Folders and files

Repository files navigation

Battertui

A lightweight TUI for viewing and switching Linux power profiles via powerprofilectl built with Go and "Bubble Tea v2".

battertui when open

Features

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

Prerequisites

  • Linux with power-profiles-daemon installed and running (providing the powerprofilesctl CLI)
  • Go (if building directly with go build / go run) or Nix with flakes enabled

Installation & Running

Using Nix Flakes

Run directly without installing:

nix run .

Or build the package:

nix build .
./result/bin/battertui

Enter the development shell (includes go, gopls, gotools, staticcheck, and power-profiles-daemon):

nix develop

Using Go

go run ./src

Or build a binary:

go build -o bin/battertui ./src
./bin/battertui

Keybindings

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

How It Works

  • Queries the active profile with powerprofilesctl get and parses available profiles from powerprofilesctl list.
  • Applies changes via powerprofilesctl set <profile> and re-fetches state upon completion.

About

A simple TUI made for managing power profiles with powerprofilectl

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages