docs » Shade

Creates a semitransparent overlay to reduce screen brightness.

Download: https://github.com/Hammerspoon/Spoons/raw/master/Spoons/Shade.spoon.zip

API Overview

API Documentation

Variables

shadeIsOn
Signature Shade.shadeIsOn
Type Variable
Description

Flag for Shade status, 'false' means shade off, 'true' means on.

shadeTransparency
Signature Shade.shadeTransparency
Type Variable
Description

Contains the alpha (transparency) of the overlay, from 0.0 (completely transparent to 1.0 (completely opaque). Default is 0.5.

Functions

toggleShade
Signature Shade:toggleShade()
Type Function
Description

Turns shade on/off

Parameters:

  • None

Returns:

  • None

Methods

bindHotkeys
Signature Shade:bindHotkeys(map)
Type Method
Description

Binds hotkeys for Shade

Parameters:

  • map - A table containing hotkey modifier/key details for the following item:
    • toggleShade - This will toggle the shade on/off, and update the menubar graphic E.g.: { toggleShade = {"cmd","alt","ctrl"},"s" }

Returns:

  • None
init
Signature Shade:init()
Type Method
Description

Sets up the Spoon

Parameters:

  • None

Returns:

  • None
start
Signature Shade:start()
Type Method
Description

Turn the shade on, darkening the screen

Parameters:

  • None

Returns:

  • None
stop
Signature Shade:stop()
Type Method
Description

Turn the shade off, brightening the screen

Parameters:

  • None

Returns:

  • None