Skip to content

This is a simple battery warning script. It uses i3's nagbar to display warnings.

Notifications You must be signed in to change notification settings

brunocriado/i3-battery-warning

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 

Repository files navigation

i3-battery-warning

This is a simple battery warning script. It uses i3's nagbar to display warnings.

Let this script run as a cronjob.

Open your crontab.

$ crontab -e

Add the following line to check battery status every minute

*/1 * * * * env DISPLAY=:0 /PATH/TO/YOUR/SCRIPT/i3batwarn.sh

in the cron tab (before calling this script).

screenshot

ScreenShot

fork changes (Bruno Criado)

I usually use my web browser and terminal in fullscreen, so I've added i3-msg to disable fullscreen and show the warning.

fork changes

Added a pidfile where the pid of each (one max) nagbar is saved and a check to kill the nagbar if the battery is above the limit. This usually works but sometimes the nagbar has to be closed manually.

About

This is a simple battery warning script. It uses i3's nagbar to display warnings.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%