Blame view

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

5c3ac220   Miguel Barão   Small update
3
This is is a little C program to indicate the current battery state and
43dd9f49   Miguel Barão   add makefile and ...
4
5
percentage in the tmux status bar. It is tmux specific as it generates status
configuration colors according to the battery level. 
9a5368c2   Miguel Barão   Add README.md file
6

43dd9f49   Miguel Barão   add makefile and ...
7
It supports Linux (using `/sys/class/power_supply`) and FreeBSD with `sysctl`.
5c3ac220   Miguel Barão   Small update
8

43dd9f49   Miguel Barão   add makefile and ...
9
10
Requires a font that includes battery symbols. Iosevka and JetBrains Mono
from NerdFonts have been tested. the output is generated in utf-8. 
9a5368c2   Miguel Barão   Add README.md file
11

43dd9f49   Miguel Barão   add makefile and ...
12
13
Compile with gnu `make` (`gmake` command in FreeBSD) and copy or link the
executable into `~/.local/bin`, which should be on your `$PATH`.
5c3ac220   Miguel Barão   Small update
14

d8824a52   Miguel Barão   Add gitignore
15
Edit `~/.tmux.conf` and setup the status bar with something like
9a5368c2   Miguel Barão   Add README.md file
16
17

```tmux
43dd9f49   Miguel Barão   add makefile and ...
18
set-option -g status-right " #($HOME/.local/bin/battery)   %a, %d %b  %H:%M "
9a5368c2   Miguel Barão   Add README.md file
19
```
d8824a52   Miguel Barão   Add gitignore
20
21
22
23

Reload tmux and enjoy!

Miguel