This was extensively discussed before and you're right. The fix is already in the WIKI, either you can do what you posted or simply choose to let the screen stay awake while charging.