Plugin: aj.plugins.power.api

class aj.plugins.power.api.PowerManager(context)[source]

Utility class for power management.

classmethod get(context)
get_adapters()[source]

Read the list of adapters from /proc/acpi/ac_adapter.

Returns:List of adapters, one per dict
Return type:list of dict
get_batteries()[source]

Parse directory /proc/acpi/battery for systems running on battery.

Returns:All batteries informations
Return type:list of dict
hibernate()[source]

Basically hibernate the system.

poweroff()[source]

Basically power off the system.

reboot()[source]

Basically reboot the system.

suspend()[source]

Basically suspend the system.


Comments

comments powered by Disqus