mjolnir.cmsj.caffeinate

Prevent various kinds of sleep activities in OSX

Usage:
local caffeinate = require "mjolnir.cmsj.caffeinate"

NOTE: Any sleep preventions will be removed when mjolnir.reload() is called. A future version of the module will save/restore state across reloads.

get

mjolnir.cmsj.caffeinate.get(sleepType) -> bool or nil

Queries whether a particular sleep type is being prevented by Mjolnir.
Arguments:

Returns:

set

mjolnir.cmsj.caffeinate.set(sleepType, aValue, AC_and_battery)

Configures the sleep prevention settings.
Arguments:

NOTES:

toggle

mjolnir.cmsj.caffeinate.toggle(sleepType) -> bool or nil

Toggles the current state of the specified sleepType.
Arguments:

Returns:

NOTE: If SystemIdle is toggled to on, it will apply to AC only.