Skip to content

robmux/battery-alert-linux

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Battery Alert for Linux

Low battery warning program for Linux users written in bash

Requirements

Installasi:

  1. 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`
  2. 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
  3. Restart

i3wm Setup

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 &

Check Battery Alert running

ps aux | grep battery-alert

Kill process

kill {process}

Give permissions

chmod 777 battery-alert.sh
sudo chmod +x battery-alert.sh

Add to .profile

$ 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/

About

Battery warning program for Linux users written in bash

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%