Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ngpm

ngpm is a very simple user-space GLib battery status monitor for Linux and BSD with an optional dependency on GTK 3 for graphical alerts.

Please read Design Manifesto before installation.

Installation

Caution

I been not testing this version on NetBSD yet, battery status is most likely to be wrong if compiles.

Compilation should detect one of the possible targets: FreeBSD, NetBSD, or Linux. To compile the source, run:

bmake

To compile ngpm with GTK 3 dialogs:

bmake -D WITH_GTK

After installation, ngpmd should start automatically in new sessions on most POSIX systems:

bmake install

If you are a careful BSD user looking for your DESTDIR:

DESTDIR=/tmp bmake install

Additionally, you may want to change your battery ID (although this is not relevant on FreeBSD, as hw.acpi.battery.life will return the combined capacity of all available batteries):

BATTERY=1 bmake

For more installation options check help command:

bmake help

Tip

On NetBSD bmake is just make

Usage

After compilation you get two executables ngpm and ngpmd.

ngpmd is not a system daemon - ngpmd.desktop file will be installed to enable session application autostart.

The ngpm command can help retrieve basic information about the battery and configuration. For example, to print the current battery capacity percentage, run:

ngpm -c

It's worth noting that non meta commands can be chained and execte in option set defined order. The listed outputs will be separated be a new line character ('\n'):

ngpm -cs

ngpmd comiplation constants can be listed with:

ngpm -l

ngpm assumes you don't change those values often, so changing them requires recompilation.

To learn more about ngpm client, use the help option:

ngpm -h

Contribute

To contribute:

  1. Fork this repo
  2. Make your changes on a separate branch
  3. Apply your feature branch for merge
  4. Thanks for contributing 🎊

License

ngpm is a free/open software licensed under ISC, suplementary to Berne, UCC, or TRIPS copyright conventions.

About

User-space power manager - replacement for upower

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages