Giter Club home page Giter Club logo

batify's Introduction

Batify

Batify is an udevrule-file triggering plug and critical battery level notifications (using libnotify and xpub)

Perks

  • Minimal: only one udevrule-file (using libnotify).
  • Everywhere: displays notifications on any current graphical session.
  • Support: for XWayland as well.

Installation

Requirements

Using libnotify, you might need to install a notification server.

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:
ACTION=="change", KERNEL=="BAT0", \

batify's People

Contributors

bugabinga avatar jdorel avatar trollwut avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

batify's Issues

Invalid value for RUN

Hi,

I installed off of AUR, and unfortunately I don't get notifications. I see in journalctl for example:

/etc/udev/rules.d/99-batify.rules:13 Invalid value "/bin/su $env{XUSER} -c 'notify-send -u normal Discharging:$attr{capacity}%'" for RUN (char 74: invalid substitution type), ignoring, but please fix it.

Any ideas what would cause this?

Thanks!

Not getting Critical and low battery notification.

Steps i took ->

  1. install batify-git from aur.
  2. ran $ udevadm control --reload-rules

Also rebooted many times. I get notification for Charger plugged in and Charger disconnected but no other notification for low battery.

System ->
OS : Arch Linux x86_64
Kernel : 6.4.12-arch1-1
DE : Hyprland
Wayland

Needs full path to notify-send

I needed full path to notify-send /usr/bin/notify-send for it to work.
Thanks for making this btw, exactly what I needed :)

new release

I was just asking when a new release is being made. The AUR package batify for example uses the last release, which means, that notification icons and the better texts are not in there.

invalid substitution type

Hi Ventto, thank you for this repo because I have used batify on my arch os for a long time. Unfortunately as of recently I see the following messages in my journalctl -p 3 -xb output. Do you have an idea how I could fix that? Thank you very much!

Nov 21 03:17:24 user systemd-udevd[307]: /etc/udev/rules.d/99-batify.rules:8 Invalid value "/bin/su $env{XUSER} -c '/usr/bin/notify-send -a batify -u critical Discharging:$attr{capacity}%'" for RUN (char 95: invalid substitution type), ignoring, but please fix it.
Nov 21 03:17:24 user systemd-udevd[307]: /etc/udev/rules.d/99-batify.rules:15 Invalid value "/bin/su $env{XUSER} -c '/usr/bin/notify-send -a batify -u critical Discharging:$attr{capacity}%'" for RUN (char 95: invalid substitution type), ignoring, but please fix it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.