File tree 1 file changed +34
-2
lines changed
1 file changed +34
-2
lines changed Original file line number Diff line number Diff line change 1
- # yabnt
2
- Yet Another Battery Notification Thing
1
+ # yabnt - yet another battery notification thing
2
+
3
+ a stupidly simple piece of code that uses libnotify to create notifications based on your battery level.
4
+
5
+ ## behaviors
6
+
7
+ ### battery% > 10%
8
+
9
+ exits immediately, no notification.
10
+
11
+ ### battery% <= 10%
12
+
13
+ creates low battery warning notification with normal urgency
14
+
15
+ ### battery% <= 5%
16
+
17
+ creates low battery warning notification with critical urgency
18
+
19
+ ## build & installation
20
+
21
+ 1 . clone repo ` git clone https://github.com/winksplorer/yabnt `
22
+ 2 . install deps, for debian this is ` sudo apt install clang libnotify-dev `
23
+ 3 . build ` make `
24
+ 4 . install ` sudo make install `
25
+
26
+ ## setting up with cron
27
+
28
+ you can use yabnt with cron to automatically give you warnings.
29
+
30
+ this example runs yabnt every minute, with messages to /tmp/yabnt.log.
31
+
32
+ ```
33
+ * * * * * DISPLAY=:0 yabnt >/tmp/yabnt.log 2>&1
34
+ ```
You can’t perform that action at this time.
0 commit comments