Preface
Nowadays, computer people often forget the passage of time when using computers. They are either busy watching TV series, busy at work, or busy at games, the normal eye protection is often neglected, so that the eyes can get enough rest time when they are idle.
I am also one of them.
However, when I find my eyes getting tired, the demand for visual protection becomes increasingly urgent.
So I used my little programming skills and python's simplicity to implement the following "script for force eye rest". When the set working time is over, the display of the computer will be forcibly disabled. If you wake up with the mouse, the display will be quickly disabled until the set rest time is over.
The specific implementation is as follows:
Work_time = int (raw_input (break_time = break_time * 60 start = raw_input (OS _str = work_stage = (start = I, work_time-i, time. sleep (60 insleep = 1 start_time = OS _str = OS. system (OS _str = OS. system (end_time = end_time-start_time> insleep = OS _str = OS. system (OS _str = OS. system (work_stage = work_stage + 1, work_stage, start = raw_input ()