Full & Low battery alert program for Linux
users written in bash.
Desktop notification when battery full or falls below a threshold percentage of your choice.
Just a friendly reminder to charge your battery, which might get low if you don't give it a boost. We've all been there, where your laptop dies and you have to find a charger, reboot, and restart all your programs. It's a hassle, i know!
ArchWiki - Desktop Notification
[doc](Desktop Notification)
- Desktop notifications wiki
- Notify-send (Libnotify) wiki
- Paplay - PulseAudio wiki
- Pw-play - Pipewire docs
- eSpeak wiki
To install or update battrey alert, you should run the [install script][2]. To do that, you may either download and run the script manually, or use the following cURL
or Wget
command:
curl -o- https://raw.githubusercontent.com/asapdotid/battery-alert-linux/refs/heads/main/install.sh | bash
wget -qO- https://raw.githubusercontent.com/asapdotid/battery-alert-linux/refs/heads/main/install.sh | bash
-
If the environment variable
$XDG_DATA_HOME
or$XDG_CONFIG_HOME
is present, it will place thebattrey alert
files there. -
The installer can use
git
,curl
, orwget
to downloadbattrey alert
, whichever is available.
Optional of customize default variables:
Variable | Default | Description |
---|---|---|
ALERT_SOUND | true |
Alert with sound or espeak (true/false) |
ALERT_FULL | true |
Alert for full battery (true/false) |
ALERT_EMPTY | true |
Alert for empty battery (true/false) |
ALERT_EMPTY_TRHESHOLD | 30 |
Empty trheshold for empty battery (%) |
Default config /home/$USER/.local/share/battery-alert/default.conf
# default variables, optional for customize
ALERT_SOUND=true
ALERT_FULL=true
ALERT_EMPTY=true
ALERT_EMPTY_TRHESHOLD=30
A timer will run the service every 2 minutes
systemctl --user list-timers
[ ] Custom set timer
If any issue please contact me @asapdotid 😃