systemd-ac-power
(1)Report whether we are connected to an external power source
systemd-ac-power [OPTIONS...]
Options
4-v--verboseShow result as text instead of just returning success or failure. Added in version 253.
--lowInstead of showing AC power state, show low battery state. In this case, will return zero if all batteries are currently discharging and below 5% of maximum charge. Returns non-zero otherwise. Added in version 254.
-h--helpPrint a short help text and exit.
--versionPrint a short version string and exit.