Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sav/uap
A minimalistic battery monitor designed to alert users about changing battery states through sound and inotify messages.
https://github.com/sav/uap
battery battery-life battery-monitor go golang libnotify linux
Last synced: about 1 month ago
JSON representation
A minimalistic battery monitor designed to alert users about changing battery states through sound and inotify messages.
- Host: GitHub
- URL: https://github.com/sav/uap
- Owner: sav
- License: mit
- Created: 2023-08-05T23:07:58.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2023-12-09T08:31:02.000Z (about 1 year ago)
- Last Synced: 2024-04-17T19:18:05.517Z (8 months ago)
- Topics: battery, battery-life, battery-monitor, go, golang, libnotify, linux
- Language: Go
- Homepage:
- Size: 38.1 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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](https://pkg.go.dev/github.com/hajimehoshi/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
```