https://github.com/Ventto/batify
  
  
    Only one udevrule file triggering plug and critical battery level notifications (multi-x sessions support) 
    https://github.com/Ventto/batify
  
bash battery level libnotify multi-xusers notification udev
        Last synced: 7 months ago 
        JSON representation
    
Only one udevrule file triggering plug and critical battery level notifications (multi-x sessions support)
- Host: GitHub
 - URL: https://github.com/Ventto/batify
 - Owner: Ventto
 - Created: 2016-12-06T15:35:12.000Z (almost 9 years ago)
 - Default Branch: master
 - Last Pushed: 2020-06-10T13:32:55.000Z (over 5 years ago)
 - Last Synced: 2024-11-07T14:38:48.670Z (12 months ago)
 - Topics: bash, battery, level, libnotify, multi-xusers, notification, udev
 - Language: Makefile
 - Homepage:
 - Size: 29.3 KB
 - Stars: 74
 - Watchers: 3
 - Forks: 16
 - Open Issues: 2
 - 
            Metadata Files:
            
- Readme: README.md
 
 
Awesome Lists containing this project
- awesome - Ventto/batify - Only one udevrule file triggering plug and critical battery level notifications (multi-x sessions support) (Makefile)
 
README
          Batify
======
*Batify is an udevrule-file triggering plug and critical battery level notifications
(using libnotify and [xpub](https://github.com/Ventto/xpub))*
## Perks
* [x] **Minimal**: only one udevrule-file (using *libnotify*).
* [x] **Everywhere**: displays notifications on any current graphical session.
* [x] **Support**: for XWayland as well.
# Installation
## Requirements
Using libnotify, you might need to install a [notification server](https://wiki.archlinux.org/index.php/Desktop_notifications).
## Package (AUR)
```
$ yaourt -S batify
```
## Manually
```
$ git clone --recursive https://github.com/Ventto/batify.git
$ cd batify
$ sudo make install
```
**Warning: After installing *batify*, do not forget to reload udev rules:**
```
$ udevadm control --reload-rules
```
# Notifications
| Description | Level |
|---|---|
| Battery level is between 10% and 19% | normal |
| Battery level is less or equal to 9% | critical |
| AC adapter plugged-in | low |
| AC adapter unplugged | low |
# Troubleshooting
## No battery level warnings displayed
* You might need to replace `BAT0` with your battery identifier:
```bash
ACTION=="change", KERNEL=="BAT0", \
```