Skip to main content

A rewrite of ideapad-cm with improved systemd and GNOME 3 integration.

Project description

ideapad-cm rewrite

:warning: USE AT YOUR OWN RISK!

:computer: A rewrite of ideapad-cm in Python with improved systemd and GNOME 3 integration.

Motivation

ideapad-cm is a popular Bash script that I have used for years to enable and disable battery conservation mode when I use GNU/Linux on my Lenovo IdeaPad laptop.

Unfortunately, the script was taken down by its original author, and it was never maintained or improved.

The 3 main features that were missing in the original project, in my opinion, are:

  • Script configuration as a systemd service. This will make it easy to autostart at boot;
  • Script integration with the desktop environment. I usually use GNOME 3 (or one of its forks), and it would be better to be able to enable and disable the script directly from the user graphical interface (as we do in Windows using Lenovo Vantage);
  • Easy installation. You needed to clone the repository locally, and manually add it to PATH. The script was added to Arch's AUR, but I don't personally use Arch that much. gnome-shell-extension-ideapad has the same problem, as manual configuration steps are still needed after installing the GNOME extension.

For the 3 reasons described above, I decided to rewrite the script in Python. I chose Python because it's the only scripting language, except Bash, that I'm familiar with.

Many other tools seem to exist (if you search "lenovo battery" on GitHub for example), but I don't currently need any advanced feature. I'm only mixing two tools: ideapad-cm and gnome-shell-extension-ideapad.

Both tools are licensed under GPLv3, so I'm free to adapt their code (with attribution and releasing this project under the same license).

I will keep the CLI compatible with the original ideapad-cm CLI. This way, you can simply uninstall the old tool (or remove it from PATH), and install my new tool. If you have existing scripts that call ideapad-cm, you don't need to change anything. The basic interface will be the same.

I'm building this tool for my own personal use. Use it at your own risk.

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

ideapad-cm-0.1.2.tar.gz (17.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ideapad_cm-0.1.2-py3-none-any.whl (17.8 kB view details)

Uploaded Python 3

File details

Details for the file ideapad-cm-0.1.2.tar.gz.

File metadata

  • Download URL: ideapad-cm-0.1.2.tar.gz
  • Upload date:
  • Size: 17.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.8.10

File hashes

Hashes for ideapad-cm-0.1.2.tar.gz
Algorithm Hash digest
SHA256 bae7fa9dd35c94db385eafdd7f2378ab0f9e2e02443901b8e414d24aef6d5798
MD5 2608ded4b43e82cc599d1636ad3c1c69
BLAKE2b-256 e6380aebadd1604ec62cdfaf9fe6400d99471b072d530a6ee070bf92620f03b7

See more details on using hashes here.

File details

Details for the file ideapad_cm-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: ideapad_cm-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 17.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.8.10

File hashes

Hashes for ideapad_cm-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f268156f01767ccc475ba6e6d2eb4b25a71efa2274550eb83808d277679cfc07
MD5 c9f9d27062fc09748b45e8593a9212db
BLAKE2b-256 485b03d2023a4e335b5ec47dede08a074f508f647f91cfb1449a7ab262cabfe1

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