aboutsummaryrefslogtreecommitdiffstats
path: root/README.org
blob: 3c967e417f429f7b1f94c48409dbb267616fe7dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
* lowbat
Very small program that runs in the background and warns you when your battery is low until you plug your laptop in. It also is POSIX-compliant, which is nice.

** Dependencies
- ~acpi~
- ~libnotify~
- ~espeak~
- ~make~
- ~gcc~

** Installation
Open a terminal and run these commands:

#+BEGIN_SRC shell
git clone https://github.com/JozanLeClerc/lowbat.git
cd lowbat
make
sudo make install
#+END_SRC

Next you must find a way to get the script running right after loging in. Add this to your startup programs manager/rc file of choice:

#+BEGIN_SRC shell
lowbat > /dev/null 2>&1 &
#+END_SRC

/Note:/ to get notifications, make sure ~dunst~ is running in the background. In your startup programs manager/rc:
#+BEGIN_SRC shell
dunst > /dev/null 2>&1 &
#+END_SRC

** Options
Two options are available:
- ~--say [MESSAGE]~ allows you to set your own warning message lowbat is active.
- ~--silent~ disables audio warnings.

**** Examples of use:
#+BEGIN_SRC shell
lowbat --say "your custom message" > /dev/null 2>&1 &
#+END_SRC

#+BEGIN_SRC shell
lowbat --silent > /dev/null 2>&1 &
#+END_SRC

** Uninstallation
#+BEGIN_SRC shell
sudo make uninstall
#+END_SRC

** See also
For more informations, check ~man lowbat~.