No description
This repository has been archived on 2025-03-19. You can view files and clone it, but cannot push or open issues or pull requests.
Find a file
Felix Ortmann d90d6afeb4 Add readme
2020-12-26 12:39:11 +01:00
src Bootstrap batalert 2020-12-26 12:15:05 +01:00
.gitignore Bootstrap batalert 2020-12-26 12:15:05 +01:00
Cargo.lock Bootstrap batalert 2020-12-26 12:15:05 +01:00
Cargo.toml Bootstrap batalert 2020-12-26 12:15:05 +01:00
LICENSE Init with MIT license 2020-12-26 11:59:39 +01:00
README.md Add readme 2020-12-26 12:39:11 +01:00

Bat-Alert

An application to send D-Bus notifications when the (Linux) host's battery runs low.

Prerequisites

  • Install libnotify
  • Install a Notification Server to render desktop notifications
    • Use mako on Wayland/Sway setups

Usage

You can run batalert with default setting to send the first notification when the battery falls below 15% and repeat the notification every 3%. batalert resets when you plug-in your charger.

Customization

  • Check the help text:
    batalert -h
    
  • Show a notification when the battery falls below 20%, repeat notification every 4% on 16%, 12%, 8% ... :
    batalert --threshold 20 --notification-step 4
    
  • Use a custom icon:
    batalert --icon /usr/share/icons/<your-icon>.png
    
  • Monitor a certain battery, e.g., BAT2:
    batalert --uevent /sys/class/power_supply/BAT2/uevent