What I just pushed
bat0daemon is a battery monitor daemon for Linux. It watches your battery and tells you when it is running low. It is written in C with GTK+3. The code is at https://github.com/kleinpanic/bat0daemon.
I just pushed the version where it all works together. I fixed the process monitor so it runs, and I added the license, an updated install script and an updated Makefile.
What it does
- sends a notification at a low threshold and at a critical threshold, and you set both
- changes how often it checks, depending on how much charge is left
- has a battery saving mode that lowers the brightness to 50 percent and suspends heavy processes
- lets you keep an ignore list, so some processes are never suspended
- writes a log to /tmp/battery_monitor.log
It runs as a user systemd service.
How it works
The daemon is src/battery_monitor.c, with notification.c and process_monitor.c next to it. A helper script, battery_daemon.sh, and a config.conf come with it. The service file is battery_monitor.service. include/version.h says 1.0.0. The license is MIT.
You need gcc, make, pkg-config and libgtk-3-dev. The install script puts the binary in /usr/local/bin and the unit in ~/.config/systemd/user.
git clone https://github.com/kleinpanic/bat0daemon.git
cd bat0daemon
./install.sh
What is not done
There is no tag and no release. The repo has no description yet either.
P.S Thanks for reading. Consider subbing to the RSS feed.
Klein Panic