Watch for battery/power state changes
This module is based primarily on code from the previous incarnation of Mjolnir by Steven Degutis.
Signature | hs.battery.watcher.new(fn) -> watcher |
---|---|
Type | Constructor |
Description |
Creates a battery watcher |
Parameters |
|
Returns |
|
Notes |
|
Source | extensions/battery/libbattery_watcher.m line 44 |
Signature | hs.battery.watcher:start() -> self |
---|---|
Type | Method |
Description |
Starts the battery watcher |
Parameters |
|
Returns |
|
Source | extensions/battery/libbattery_watcher.m line 75 |
Signature | hs.battery.watcher:stop() -> self |
---|---|
Type | Method |
Description |
Stops the battery watcher |
Parameters |
|
Returns |
|
Source | extensions/battery/libbattery_watcher.m line 97 |
© 2014–2017 Hammerspoon contributors
Licensed under the MIT License.
https://www.hammerspoon.org/docs/hs.battery.watcher.html