#
hs.redshift
Inverts and/or lowers the color temperature of the screen(s) on a schedule, for a more pleasant experience at night
Usage:
-- make a windowfilterDisable for redshift: VLC, Photos and screensaver/login window will disable color adjustment and inversion
local wfRedshift=hs.window.filter.new({VLC={focused=true},Photos={focused=true},loginwindow={visible=true,allowRoles='*'}},'wf-redshift')
-- start redshift: 2800K + inverted from 21 to 7, very long transition duration (19->23 and 5->9)
hs.redshift.start(2800,'21:00','7:00','4h',true,wfRedshift)
-- allow manual control of inverted colors
hs.hotkey.bind(HYPER,'f1','Invert',hs.redshift.toggleInvert)
Note:
- As of macOS 10.12.4, Apple provides "Night Shift", which implements a simple red-shift effect, as part of the OS. It seems unlikely that
hs.redshift
will see significant future development.
#
API Overview
Variables - Configurable values
COLORRAMP
Functions - API calls offered directly by the extension
invertSubscribe invertUnsubscribe isInverted requestInvert start stop toggle toggleInvert