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.

Source Source/Shade.spoon/init.lua
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.

Source Source/Shade.spoon/init.lua

Functions

toggleShade
Signature Shade:toggleShade()
Type Function
Description

Turns shade on/off

Parameters:

  • None

Returns:

  • None
Source Source/Shade.spoon/init.lua

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
Source Source/Shade.spoon/init.lua
init
Signature Shade:init()
Type Method
Description

Sets up the Spoon

Parameters:

  • None

Returns:

  • None
Source Source/Shade.spoon/init.lua
start
Signature Shade:start()
Type Method
Description

Turn the shade on, darkening the screen

Parameters:

  • None

Returns:

  • None
Source Source/Shade.spoon/init.lua
stop
Signature Shade:stop()
Type Method
Description

Turn the shade off, brightening the screen

Parameters:

  • None

Returns:

  • None
Source Source/Shade.spoon/init.lua