Blame view

README.md 414 Bytes
43dd9f49   Miguel Barão   add makefile and ...
1
# Battery for tmux in FreeBSD
9a5368c2   Miguel Barão   Add README.md file
2

5c3ac220   Miguel Barão   Small update
3
This is is a little program to use in the tmux status bar to indicate the
43dd9f49   Miguel Barão   add makefile and ...
4
5
current battery state a life.
It uses the FreeBSD `sysctl` and is not compatible with Linux.
9a5368c2   Miguel Barão   Add README.md file
6

43dd9f49   Miguel Barão   add makefile and ...
7
Compile with
5c3ac220   Miguel Barão   Small update
8

43dd9f49   Miguel Barão   add makefile and ...
9
10
```sh
cc -Os battery.c -o battery
9a5368c2   Miguel Barão   Add README.md file
11
```
43dd9f49   Miguel Barão   add makefile and ...
12
13

In `~/.tmux.conf` setup the status bar like the following, with the correct path
5c3ac220   Miguel Barão   Small update
14
to the executable.
d8824a52   Miguel Barão   Add gitignore
15

9a5368c2   Miguel Barão   Add README.md file
16
17
```tmux
set-option -g status-right "#(/path/to/battery)"
43dd9f49   Miguel Barão   add makefile and ...
18
```
9a5368c2   Miguel Barão   Add README.md file

d8824a52   Miguel Barão   Add gitignore