Utility application for Low battery warning in i3wm, It is currently bare-minimum, can be updated as time passes and requirements arise wile using it.
Caution
Use only on i3wm, as it does not have buttons for minimizing / closing on screen (TODO).
Compile the binary as battery
, and put it in /usr/local/bin
.
Hence, on running this command.
which battery
you got
/usr/local/bin/battery
Then can go ahead.
Create a new systemd
service file.
sudo vim /etc/systemd/system/battery.service
Paste this in it.
[Unit]
Description=Battery Warning
[Service]
Type=simple
User={YOUR_USERNAME}
Environment=DISPLAY=:0
Environment=XAUTHORITY=/home/{YOUR_USERNAME}/.Xauthority
Environment=XDG_RUNTIME_DIR=/run/user/1000
ExecStart=/usr/local/bin/battery
[Install]
WantedBy=multi-user.target
start service about new service
sudo systemctl start battery
Run it 24 / 7 all the time by,
sudo systemctl enable battery