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 line 112
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 line 86

Functions

toggleShade
Signature Shade:toggleShade()
Type Function
Description

Turns shade on/off

Parameters
  • None
Returns
  • None
Source Source/Shade.spoon/init.lua line 220

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
Returns
  • None
Examples
Source Source/Shade.spoon/init.lua line 252
init
Signature Shade:init()
Type Method
Description

Sets up the Spoon

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

Turn the shade on, darkening the screen

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

Turn the shade off, brightening the screen

Parameters
  • None
Returns
  • None
Source Source/Shade.spoon/init.lua line 202