Skip to main content

Sends desktop notifications for low and critical battery warnings, and optionally when charging/discharging state changes

Project description

battery_notifier

Sends desktop notifications for low and critical battery warnings, and optionally when charging/discharging state changes

Installation

battery_notifier has the following dependencies available on PyPI:

  • pydbus
  • PyGObject

The package can be installed using pipx, e.g.:

pipx install battery_notifier

Configuration

battery_notifier can be configured with a file located at ~/.config/battery_notifier/config.ini, e.g.

# Enable/disable the notifications for discharging and charging
enable_discharging_notification = true
enable_charging_notification = true

# Notification timeouts in ms
low_notification_expire_timeout = 0
critical_notification_expire_timeout = 0
discharging_notification_expire_timeout = 0
charging_notification_expire_timeout = 5000

Starting with systemd

A systemd service file is included in this repository which can be enabled and started like so:

# Copy the service file
cp battery_notifier.service ~/.local/share/systemd/user/

# Enable the service
systemctl --user enable battery_notifier

# Start the service
systemctl --user start battery_notifier

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

battery_notifier-0.2.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

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

battery_notifier-0.2-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file battery_notifier-0.2.tar.gz.

File metadata

  • Download URL: battery_notifier-0.2.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for battery_notifier-0.2.tar.gz
Algorithm Hash digest
SHA256 9b5fb3c87c7ba8259e07c59274b1eb00e0d6c433a3d7e80d0506224969220cc8
MD5 49ed388d5b6439f1a1906226f02b8843
BLAKE2b-256 3e87537a7d906a8ee388b2ba1ee1829db0dd6368bc28578226a79ad69abb513f

See more details on using hashes here.

File details

Details for the file battery_notifier-0.2-py3-none-any.whl.

File metadata

  • Download URL: battery_notifier-0.2-py3-none-any.whl
  • Upload date:
  • Size: 5.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for battery_notifier-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 33daafd06d167a9955da3728c41c80ae810e9b1f57c818031c687e2d654f0e09
MD5 fedbaa3463ebaec5480f6d4bebe1685a
BLAKE2b-256 bde77ba0f8d9d63d3162ca2527932ff303decf84ac3bc533bd2ed75b871f26ba

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