This repository contains a Python application that allows you to set the battery charge stop threshold for ASUS laptops on Linux. It provides a graphical user interface (GUI) using PyQt5 and executes a bash script to modify the threshold.
This only works for devices using systemd
which should generally be the case
git clone https://github.com/shitan198u/Battery_Charge_Stop_Threshold.git
cd Battery_Charge_Stop_Threshold
Setting the permissions
sudo chmod +x modify_threshold.sh
It requires the pyqt5 package you can install from below
Ubuntu/Debian:
sudo apt-get update
sudo apt-get install python3-pyqt5
Fedora:
sudo dnf install python3-qt5
openSUSE:
sudo zypper install python3-qt5
Arch Linux:
sudo pacman -S python-pyqt5
Using Pip:
You can also install PyQt5 using the pip
package manager. Here's how:
-
First, make sure you have
pip
installed on your system. You can check ifpip
is installed by running the commandpip --version
orpip3 --version
. Ifpip
is not installed, you can install it using your distribution's package manager. For example, on Ubuntu/Debian you can runsudo apt-get install python3-pip
. -
Once you have
pip
installed, you can install PyQt5 by running the commandpip install PyQt5
orpip3 install PyQt5
. This will download and install the latest version of PyQt5 from the Python Package Index.
After installing PyQt5 using pip
, you should be able to run the PyQt5 GUI application script.
once inside the ./Battery_Charge_Stop_Threshold launch using:
python3 app.py