Skip to main content
Donate to the Python Software Foundation or Purchase a PyCharm License to Benefit the PSF! Donate Now

Python powermanagement script for my linux laptop.

Project description


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: laptop-pm [-h] [-v] [-f] {battery,ac-adapter,show}

positional arguments::
{battery,ac-adapter,show} action to perform

-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:

- `example config for devices <>`_

To use it with an acpi event see:

- `battery <>`_
- `ac-adapter <>`_

You can just copy it to directory /etc/acpi/events and modify it.

To get your acpi event just call::


You need create a file for local rc because on boot there is no acpi event.

- `startup battery check <>`_

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

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
laptop-pm-0.1.tar.gz (5.5 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page