Skip to main content

Python powermanagement script for my linux laptop.

Project description

laptop-pm
=========

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


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

visit `installing <https://bitbucket.org/igraltist/laptop-pm/src/tip/docs/installing.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


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

Project details


Download files

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

Source Distribution

laptop-pm-0.0.3.16.tar.gz (18.0 kB view details)

Uploaded Source

File details

Details for the file laptop-pm-0.0.3.16.tar.gz.

File metadata

  • Download URL: laptop-pm-0.0.3.16.tar.gz
  • Upload date:
  • Size: 18.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for laptop-pm-0.0.3.16.tar.gz
Algorithm Hash digest
SHA256 9ebd5e8ff2486c1a6993b9023df1673a28fcc5f1a920017ccb3a3a13d7737e17
MD5 507df0eb2e1c5de28a8bf83a7c843fdc
BLAKE2b-256 c7962478db9ae149a4affc5d26fd48b47a877f1e316c0ed6cf399b0a2f9c6c01

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page