This is a daemon written in C for battery warning. It uses notify-osd package for notifications. The installation script is made keeping i3 window manager in mind, but it can be used in any environment by keeping the compiled output in init scripts.
Just run the install script.
./install-i3-battery-warning
Compile the i3-battery-warning.cpp and place the executable so that it gets executed on startup.
g++ i3-battery-warning.cpp -o i3-battery-warning