How do i check whether my laptop is on battery or on cable
I have a package which decrypts hard disk and then encrypts. This will be taking a lot of time. So, we do not want it to be installed when the laptop is on battery. How do i check whether the machine is on battery or cable.