Python powermanagement script for my linux laptop.
Homepage Repository PyPI Python
A python power mangagment scripts for a laptop which running linux.
visit installing webpage
Use an acpi event to put the laptop in different powerstage.
usage:
usage: laptop-pm [-h] [-v] [-f] {battery,ac-adapter,show}
-h | show this help message and exit |
-v | make the script noisily |
-f | do action even its in the same stage |
Set device to manage:
To use it with an acpi event see:
You can just copy it to directory /etc/acpi/events and modify it.
To get your acpi event just call:
acpi_listen
You need create a file for local rc because on boot there is no acpi event.
Gentoo:
Create /etc/local.d/set-power-battery.start and make it executable and write follow content: # check if the laptop start with battery if [ "$(laptop-pm show)" = "battery" ]; then laptop-pm battery fi