power.plugged readonly


The power.plugged checks if the computer is plugged to AC, returning true or false otherwise.

Example

--! luart-extensions import power print("Computer is currently powered by "..(power.plugged and "AC" or "battery"))