…or how to create a cool display darkener.
So today we make our screen off just with one click on that icon:
With this little utility we can control the screen easily. It is better than set too little time to auto screen off.
Create a blueprint
First we create a blueprint, that we pimp up later. Create a new file and make its extension to .bat
Open it and type the following lines
@echo off
cls
color 0
title Let there be dark
ECHO **********************************************************
ECHO * Fear of the dark *
ECHO **********************************************************
ECHO.
ECHO Screen off......
ECHO.
Feel free to change the title, color and so on…
Choose the method
The ugly - set empty screensaver
Append the following line to our blueprint
REM start en empty screensaver
scrnsave.scr /s
After save, we are already control our screen. But it has one major pitfall. The screen is not turned off really, just dark, but there is light as well. It is okay for those, who fear of the dark…
The less ugly- 3rd party tool
If we want a more sophisticated result then check NirCMD utility. It has a lot of fancy function with you can control the computer, without deep knowledge of the soul of your hardware and operating system.
nircmd monitor off
A little cosmetic
When we move the mouse the darkness gone, during night it feels like armageddon. So we customize our batch further.
:darkness
nircmd monitor off
ECHO %incr% RE-darking... Press any key %date% %time%
SET /A incr=%incr%+1
PAUSE >nul
GOTO :darkness
We create loop with labels, when the screen turn on, with keypress we GO TO :darkness label again till the end of time.
Create a shortcut icon
Create a shortcut icon and place on your desktop. Choose a fancy icon for it, I prefer the dark clock for this task.
Yeah, that’s really cool 😎
The full batch file is downloadable from here
Comments