CLI tool that notifies you when your battery is low.
Just start it and let it run in background:
battery-notifierbattery-notifier is configured using environment variables.
The following environment variables are used:
BN_BATTERY_PATH- Path to the battery device directory- Default:
/sys/class/power_supply/BAT0
- Default:
BN_ADAPTER_PATH- Path to the power adapter device directory- Default:
/sys/class/power_supply/AC0
- Default:
BN_THRESHOLD- Battery level threshold- Default:
15
- Default:
BN_PERIOD_SECS- Period of battery state polling in seconds- Default:
30
- Default:
BN_NOTIFY_COMMAND- Command to execute when battery level is below the threshold- Default:
notify-send "The battery is low" "Please connect the charger"
- Default:
Note: Arch-based distro users may skip to Installation (Arch-based distros) section
- C compiler
- Make
makeNote: this may require root privileges.
make installThis will install the binary to /usr/local/bin if the INSTALL_PREFIX environment variable is not set. Set the INSTALL_PREFIX environment variable to change the installation directory.
Use this AUR package