Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dlion/acdc
It alerts me when someone unplugs the AC cable from my computer.
https://github.com/dlion/acdc
ac-cable acdc golang
Last synced: 2 months ago
JSON representation
It alerts me when someone unplugs the AC cable from my computer.
- Host: GitHub
- URL: https://github.com/dlion/acdc
- Owner: dlion
- License: mit
- Created: 2015-05-20T00:08:17.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-05-25T16:54:44.000Z (over 9 years ago)
- Last Synced: 2024-04-14T18:06:33.351Z (8 months ago)
- Topics: ac-cable, acdc, golang
- Language: Go
- Homepage: http://dlion.it
- Size: 122 KB
- Stars: 6
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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```sh
*/5 * * * * DISPLAY=:0.0 /path/to/file
```
## License
MIT## Author
* Domenico Luciani
* [email protected]
* http://dlion.it