Skip to content

Instantly share code, notes, and snippets.

@Habbie
Last active July 14, 2017 10:49
Show Gist options
  • Save Habbie/c5be2aca51236766c1118224d8e7ffc7 to your computer and use it in GitHub Desktop.
Save Habbie/c5be2aca51236766c1118224d8e7ffc7 to your computer and use it in GitHub Desktop.
> > function blurothers() local dark={{red=0.5, green=0.5, blue=1.0}, {alpha=1.0, red=0.0, green=0.0, blue=0.0}} local light ={{red=1.0, green=1.0, blue=1.0}, {alpha=1.0, red=0.0, green=0.0, blue=0.0}} local main = hs.mouse.getCurrentScreen() for i,v in ipairs(hs.screen.allScreens()) do if v == main then v:setGamma(light[1], light[2]) else v:setGamma(dark[1], dark[2]) end end end
> blurothers()
> blurothers()
> blurothers()
> blurtimer = hs.timer.new(0.1, blurothers)
> blurtimer:start()
hs.timer: running (0x608000c50768)
>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment