Low battery warning program for Linux users written in bash
-
Clone this project to:
git clone https://github.com/asapdotid/linux-battery-alert.git ~/.config/battery-alert
or
git clone https://github.com/asapdotid/linux-battery-alert.git ~/.local/bin/battery-alert`
-
Setup autostart
battery-alert
:-
mkdir -p ~/.config/autostart
(if not exist)
-
nano ~/.config/autostart/battery-alert.desktop
(editor: nano/gedit/vim/nvim)
[Desktop Entry] Name=Battery-Alert Comment=Notification for battery alert Exec=~/.config/battery-alert/battery-alert.sh & Type=Application Terminal=false Hidden=false
or
[Desktop Entry] Name=Battery-Alert Comment=Notification for battery alert Exec=~/.local/bin/battery-alert/battery-alert & Type=Application Terminal=false Hidden=false
-
-
Restart
Add start battery-alert
to i3 config
:
exec --no-startup-id ~/.config/battery-alert/battery-alert &
or
exec --no-startup-id ~/.local/bin/battery-alert/battery-alert &
ps aux | grep battery-alert
kill {process}
chmod 777 battery-alert.sh
sudo chmod +x battery-alert.sh
$ vi ~/.profile
sh ~/.config/battery-alert/battery-alert.sh &
If any issue please contact me @asapdotid 😃
Useful
https://www.2daygeek.com/linux-low-full-charging-discharging-battery-notification/