Skip to content
/ aCdC Public

It alerts me when someone unplugs the AC cable from my computer.

License

Notifications You must be signed in to change notification settings

dlion/aCdC

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

aCdC

It is a simple software that checks if my AC cable is plugged on my pc.
If not, it shows an alert and sends me an email with a custom body.
If battery percentage is lower than the THRESHOLD constant, it shuts my pc down safely.
You must to be root to shutdown your pc.

Configuration

Edit configuration file: src/config.go

Why in GoLang ?

Because I want to learn golang.

Gopher Newbie

I'm a newbie about golang so if you have suggestions, please, let me know!

Requirements

  • acpiTool
  • xmessage
  • a Gmail account

Crontab

I added the binary to my root crontab file, every 5 minutes cron checks if my AC cable is plugged on pc

*/5 * * * * DISPLAY=:0.0 /path/to/file

License

MIT

Author

About

It alerts me when someone unplugs the AC cable from my computer.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages