Skip to content
/ uap Public

A minimalistic battery monitor that alerts through sounds and inotify messages.

License

Notifications You must be signed in to change notification settings

sav/uap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UAP

A minimalistic battery monitor designed to alert users about changing battery states through sound and inotify messages.

๐Ÿ’พ Installation

go install github.com/sav/uap@latest

๐Ÿ“ Configuration

Begin by copying uaprc.example to ~/.uaprc and proceed to make edits as per your requirements.

wget https://raw.githubusercontent.com/sav/uap/master/uaprc.example -O ~/.uaprc

To receive notifications about the battery's levels and states, it is essential to include a field in the batteries section containing its corresponding name.

You can usually locate the battery's name within its sysfs directory, often listed in the uevent file. To view all attributes related to power supplies on a Linux system, execute the following command:

cat /sys/class/power_supply/*/uevent

๐Ÿ”จ Build

Dependencies

Linux

Oto is a package used to play sounds in Go. On Linux, it relies on ALSA to function.

To install ALSA library on Ubuntu or Debian, run this command:

apt install libasound2-dev

And on RedHat-based Linux distributions, run:

dnf install alsa-lib-devel