Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/asapdotid/battery-alert-linux
Battery warning or alert program for Linux users written in bash
https://github.com/asapdotid/battery-alert-linux
alert-messages alerting autostart-script battery battery-alert battery-alert-linux battery-monitor linux
Last synced: 14 days ago
JSON representation
Battery warning or alert program for Linux users written in bash
- Host: GitHub
- URL: https://github.com/asapdotid/battery-alert-linux
- Owner: asapdotid
- License: mit
- Created: 2022-07-04T05:54:46.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-12-19T12:17:25.000Z (22 days ago)
- Last Synced: 2024-12-19T13:26:00.091Z (22 days ago)
- Topics: alert-messages, alerting, autostart-script, battery, battery-alert, battery-alert-linux, battery-monitor, linux
- Language: Shell
- Homepage:
- Size: 43 KB
- Stars: 1
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Battery Alert for Linux
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!
## Reference:
`ArchWiki - Desktop Notification` [doc]([Desktop Notification](https://wiki.archlinux.org/title/Desktop_notifications))
## Requirement Package
- Desktop notifications [wiki](https://wiki.archlinux.org/title/Desktop_notifications)
- Notify-send (Libnotify) [wiki](https://man.archlinux.org/man/notify-send.1.en)
- Paplay - PulseAudio [wiki](https://linux.die.net/man/1/paplay)
- Pw-play - Pipewire [docs](https://docs.pipewire.org/page_man_pw-cat_1.html)
- eSpeak [wiki](https://espeak.sourceforge.net/)## Installing and Updating
### Install & Update Script
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:
```sh
curl -o- https://raw.githubusercontent.com/asapdotid/battery-alert-linux/refs/heads/main/install.sh | bash
``````sh
wget -qO- https://raw.githubusercontent.com/asapdotid/battery-alert-linux/refs/heads/main/install.sh | bash
```#### Additional Notes
- If the environment variable `$XDG_DATA_HOME` or `$XDG_CONFIG_HOME` is present, it will place the `battrey alert` files there.
- The installer can use `git`, `curl`, or `wget` to download `battrey alert`, whichever is available.
-### Custom Variables for Alert
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`
```bash
# default variables, optional for customize
ALERT_SOUND=true
ALERT_FULL=true
ALERT_EMPTY=true
ALERT_EMPTY_TRHESHOLD=30
```## Check Battery Alert service & timer
> A timer will run the service every 2 minutes
```bash
systemctl --user list-timers
```## To Do
[ ] Custom set timer
If any issue please contact me [@asapdotid](mailto:[email protected]) 😃