Friday, April 25, 2014

Fader - screensaver smoothly turning off display

When I was using Linux some time ago, I found out there is a really great thing about screensavers. Before starting, the display is fading out smoothly so you don't get shocked and you have ability to break starting screensaver. There is something similar in Windows (at least in 7) when turning off display, but it's hopelessly fast and you're not able to stop it. You have to wait for turning display off, then move mouse and wait for turning it on. In short, it sucks, doesn't it?

That feature in Linux is adorable, so I've written simple app for Windows which does better than default. Actually, it's a screensaver and after fadeout turns off display. It's not especially complex, but supports multi-screen displays, has some settings and can be stopped. I created this some years ago, and now I've decided to share it here with source code. If you would like to use the code, go ahead but it'd be nice if you place some info about the author:
https://github.com/piomar123/Fader

I should say something about settings. There is "alpha step" and "step interval". The first is amount of alpha (let's say brightness) changed every interval time. Alpha changes from 0 (transparent) to 255 (fully black), so greater values make fading faster and less smooth. Step interval is in milliseconds and the higher value, the slower fading is.
In conclusion, funny fact. Ironically, I'm not able to use this screensaver on my laptop due to wonderful mouse wireless receiver (actually the software) that prevents screensaver from starting.

No comments:

Post a Comment