i grep for a few critical apps, and avoid locking if any are open. screen recording, video call, etc. lock starts as soon as they exit.