Skip to main content
laptop-pm
=========

A python power mangagment scripts for a laptop which running linux.


Installation
------------

visit `installing <https://bitbucket.org/igraltist/laptop-pm/src/tip/INSTALL.rst>`_ webpage


Usage
-----

Use an acpi event to put the laptop in different powerstage.

usage::

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 <https://bitbucket.org/igraltist/laptop-pm/src/tip/docs/examples/etc/laptop-pm/laptop-pm.json>`_

To use it with an acpi event see:

- `battery <https://bitbucket.org/igraltist/laptop-pm/src/tip/docs/examples/etc/acpi/events/battery>`_
- `ac-adapter <https://bitbucket.org/igraltist/laptop-pm/src/tip/docs/examples/etc/acpi/events/ac-adapter>`_

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.


- `startup battery check <https://bitbucket.org/igraltist/laptop-pm/src/tip/docs/examples/etc/local.d/set-power-battery.start>`_
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


Metadata

Release files for laptop-pm 0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for laptop-pm 0.1
File Size Uploaded Provenance Actions
laptop-pm-0.1.tar.gz 5.5 kB Without provenance Details for laptop-pm-0.1.tar.gz

Release files / laptop-pm-0.1.tar.gz

Download URL laptop-pm-0.1.tar.gz
Size 5.5 kB
Tags Source
SHA-256 checksum
How to use checksums
a20c1ad977a038cf9413874530caafc26a0d199e0f1355b1fbf43252a6faacf1
BLAKE2b-256 checksum
How to use checksums
ae8594a31a7eaf60ad704760f656b4133960e45e4708d10ff4ff8b42823cc9c0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for laptop-pm 0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page