Skip to content

This is a simple alert system made in Python that monitors the charge of the PC. The goal is to prevent the battery from constantly being uncalibrated.

Notifications You must be signed in to change notification settings

emichester/battery-charge-control

Repository files navigation

battery-charge-control

This is a simple alert system made in Python that monitors the charge of the PC. The goal is to prevent the battery from constantly being uncalibrated.

Note: this aplication is suposed to work in Ubuntu (Linux in general) and was tested in Ubuntu 18.04 LTS

Requirements

$ apt-get install -y python3-tk
$ apt-get install -y python3-pip
$ pip3 install psutil
$ pip3 install threading

Basic usage

Go to desktop and create a file with .desktop extension, name it as you want e.g. "battery.desktop" With bash simply:

$ cd ~/Desktop
$ touch battery.desktop
$ chmod +x battery.desktop

inside of that file you must add the following text (change /path/to/battery-charge-control for the path to cloned repo)

#!/usr/bin/env xdg-open
[Desktop Entry]
Name=Battery Checker
Comment=Battery level checker
Exec=/path/to/battery-charge-control/py_bat_notification.py
Icon=/path/to/battery-charge-control/battery.png
Terminal=true
Type=Application

and then just double click on the new app with the battery icon.

Play with the values you think are the best (default values are 40% ↔️ 80%)

You can modify the parameters ( recommended_values # test_values ):

TIME_TO_WAIT = 5000 # in milliseconds 
LOWER_THRESHOLD = 40
UPPER_THRESHOLD = 80
SHOW_MESSAGE_TIME = 20.0

Appearance

imagen

Notifications

imagen

imagen

About

This is a simple alert system made in Python that monitors the charge of the PC. The goal is to prevent the battery from constantly being uncalibrated.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages