2021-01-03 11:03:04 +01:00
It is recommended that the ⚡️ battery⚡️ of a device is between 45% and 80% to extend its life. This script alert if the battery exceeds certain percentage charge limits to maintain health. Only for MacOS.
2021-01-03 10:51:19 +01:00
2021-01-03 10:51:56 +01:00
**Emacs Lisp 100.0%**
2021-01-03 10:51:19 +01:00
2021-01-03 11:24:02 +01:00
# Requirements
- Emacs or an Emacs Lisp compatible interpreter.
- MacOS.
2021-01-03 10:51:19 +01:00
# Run
``` shell
emacs --no-init-file --no-site-file --script macos-battery-alert-to-maintain-health.el
```
# Cron
2021-01-03 12:29:47 +01:00
Automates to check every minute.
2021-01-03 10:51:19 +01:00
Open `crontab` .
``` shell
crontab -e
```
Add the following line. Be sure to change the path of the script.
``` shell
2021-01-03 12:29:47 +01:00
* * * * * emacs --no-init-file --no-site-file --script macos-battery-alert-to-maintain-health.el
2021-01-03 10:51:19 +01:00
```