Skip to content

funcsec/battery-notify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Battery Notify

Know when you need to run to the charger

Table of Contents
  1. About The Project
  2. Getting Started
  3. Contributing
  4. License
  5. Contact

About The Project

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.

(back to top)

Built With

  • systemd
  • bash
  • linux
  • stow

(back to top)

Getting Started

Here is to get the project up and running to monitor and alert you when you battery is low.

Prerequisites

The project requires Linux with systemd, notify-send, and stow.

sudo apt update 
sudo apt install stow -y

Installation

  1. Clone the repo
    git clone https://github.com/funsec/battery-notify.git $HOME/.dotfiles/battery-notify
  2. Use stow to link the files into the correct directories
    cd $HOME/.dotfiles/battery-notify
    stow -vt $HOME/ battery-notify
  3. Reload user systemd daemon
    systemctl --user daemon-reload
  4. Start and enable user systemd timer
    systemctl --user enable battery-notify.timer
    systemctl --user start battery-notify.timer
  5. Let you battery run below 15% to test the notifications

(back to top)

Contributing

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!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

Contact

funcsec - @funcsec

Project Link: https://github.com/funsec/battery-notify

(back to top)

About

Know when you need to run to the charger

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages