How to know the battery status of a MacBook