I have the following line to turn my laptop display off:
sleep 1 && xset dpms force standby
sleep 1: Puts the thread to sleep for 1 second.
xset dpms force standby: From man, forces the dpms flag to standby.
When I omit the
sleep 1 command, the
xset command puts the pc in standby mode for 1 second, then automatically resumes normal operation. But when combined with
sleep 1 command, it puts the pc in standby mode indefinitely, until a user input has been detected.
Can you explain the relationship between these two commands and why it works this way?