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.
Should you use it?
If you use a Lenovo IdeaPad laptop and a GNU/Linux distribution, then you definitely need to install this tool!
Battery conservation mode always keeps your battery charged around 60%. Your battery will last longer.
Installation
The easiest installation method is to use
pipx. Make sure to run pipx ensurepath
after installing pipx.
pipx install ideapad-cm
Usage
As of version 0.1.3, only 3 commands are supported.
ideapad-cm enable
This command enables the battery conservation mode.
ideapad-cm disable
This command disables the battery conservation mode.
ideapad-cm status
This command lets you know if the battery conservation mode is enabled or disabled.
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-ideapadhas 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ideapad-cm-0.1.3.tar.gz.
File metadata
- Download URL: ideapad-cm-0.1.3.tar.gz
- Upload date:
- Size: 18.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
864bf95524b75eda42f946c282daa2ab34c963123cd640e48ad1432302941305
|
|
| MD5 |
614b177e25aa69516fdab0f73f94bc27
|
|
| BLAKE2b-256 |
9f9f3cdf74a028c14a3957444ff759b55ebb2e73df74cdf86c3b3de9782cf5c8
|
File details
Details for the file ideapad_cm-0.1.3-py3-none-any.whl.
File metadata
- Download URL: ideapad_cm-0.1.3-py3-none-any.whl
- Upload date:
- Size: 18.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0aa9e7a8c01eab5b595e70d59d6f0f201d1be250a76f1e2c6f83a8e7fa415f60
|
|
| MD5 |
62bd77af48e8075afbefcd6362dcd079
|
|
| BLAKE2b-256 |
6f0ad3ae5b4db531c25a816d94aa277e51598fa8bf0471155c5962b8ceca87db
|