#battery #power #notifications

app powalert

System battery and power status notifier

2 releases

0.1.2 Apr 29, 2020
0.1.0-alpha2 Apr 18, 2020

#42 in #battery

MIT license

16KB
367 lines

Build Status

powalert

Powalert is a cross-platform battery and system power status notifier. Get notified when your computer is unplugged or plugged in, when the battery is fully charged, or when the battery power level drops below a preset threshold.

Install

Arch Linux

There is an Arch Linux Package in the Arch User Repository. The easiest way to install is with an aur helper. Any AUR helper should work, but this example uses yay:

yay -S powalert

You can also install using makepkg by following the official instructions

Source

To install from source, first build the program by following these instructions:

  1. Install rust, which includes the cargo utility, and git if you haven't already.
  2. Clone the repository:
git clone https://github.com/zonotope/powalert.git
  1. Change to the directory and build:
cd powalert
cargo build --release

The program will saved as target/release/powalert, and you can copy it anywhere in your path to use it.

There is also a systemd unit to run powalert automatically in the systemd directory.

Usage

powalert 0.1.0
System power notifier

USAGE:
    powalert [OPTIONS]

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

OPTIONS:
    -i, --interval <interval>          Pause time before polling batteries for updates in seconds
    -t, --low-threshold <threshold>    Threshold percentage to send low power notifications
    -v, --verbose <verbose>            Verbosity level (either '0', '1', or '2')

Dependencies

~3–5MB
~87K SLoC