Know when you need to run to the charger
Table of Contents
Very simple script and systemd timer/service for notifying you when your laptop charge is low and you need to run to the charger.
Great for using i3wm or other minimal windows managers that lack desktop environment perks.
Timer runs every 5 minutes and notifies when the battery life drops below 15%. Does not Suspend or Hibernate computer, runs with user priviledges.
- systemd
- bash
- linux
- stow
Here is to get the project up and running to monitor and alert you when you battery is low.
The project requires Linux with systemd, notify-send, and stow.
sudo apt update
sudo apt install stow -y- Clone the repo
git clone https://github.com/funsec/battery-notify.git $HOME/.dotfiles/battery-notify - Use
stowto link the files into the correct directoriescd $HOME/.dotfiles/battery-notify stow -vt $HOME/ battery-notify
- Reload user systemd daemon
systemctl --user daemon-reload
- Start and enable user systemd timer
systemctl --user enable battery-notify.timer systemctl --user start battery-notify.timer - Let you battery run below 15% to test the notifications
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Distributed under the MIT License. See LICENSE.txt for more information.
funcsec - @funcsec
Project Link: https://github.com/funsec/battery-notify