docs » Caffeine

Prevent the screen from going to sleep Download: https://github.com/Hammerspoon/Spoons/raw/master/Spoons/Caffeine.spoon.zip

API Overview

API Documentation

Methods

bindHotkeys
Signature Caffeine:bindHotkeys(mapping)
Type Method
Description

Binds hotkeys for Caffeine

Parameters:

  • mapping - A table containing hotkey modifier/key details for the following items:
    • toggle - This will toggle the state of display sleep prevention, and update the menubar graphic

Returns:

  • The Caffeine object
start
Signature Caffeine:start()
Type Method
Description

Starts Caffeine

Parameters:

  • None

Returns:

  • The Caffeine object
stop
Signature Caffeine:stop()
Type Method
Description

Stops Caffeine

Parameters:

  • None

Returns:

  • The Caffeine object