# bxbar
A very basic X status bar.
## Just the Right Amount of Info
Similar to my path with bxwm and bxhkd, I wanted a status bar that
did neither more nor less than what I needed. I wanted a program
that only renders text, leaving the logic of gathering system data
to more appropriate tools. bxbar is the result: a minimal, EWMH
compliant dock that simply renders a string from standard input.
## Dependencies
- Xlib
- Xft
- A C compiler compliant with the C11 standard.
## Build
Compile bxbar from source.
```
make
```
## Install
Install the binary, man page, and run command script. Note that root
privileges are not required as the default destination is `~/.local/`.
```
make install
```
## Uninstall
Remove the binary, man page, and run command script.
```
make uninstall
```
## Configuration
__bxbar__ is configured at compile-time by editing config.def.h.
After making changes, the program must be recompiled and
reinstalled. See bxbar(1) for details.
## Design & Functionality
__bxbar__ is built around a set of opinionated primitives:
- Renderer, NOT an orchestrator
- Reads from stdin
- Splits output into two sections (left and right) using an invisible separator (\x01)
- Renders to the top of the screen adhering to EWMH docking standards
- Helper Binaries
- bxinfo: Queries EWMH atoms directly from the X server for workspace/window state
- bxnet: Queries /sys/class/net/ to provide network connection status
- Lua Orchestration
- bxbarrc.lua: The orchestrator that gathers data from helpers and system files, formats the output, and pipes the string to bxbar
Add the following to your `/.xinitrc` to start __bxbar__.
```
"$HOME"/.local/bin/bxbarrc.lua | "$HOME"/.local/bin/bxbar &
```
When __bxbar__ is used with bxwm(1) and bxhkd(1), add the following
to your `~/.xinitrc`.
```
# Start bxwm in the background, give it a moment to initialize
"$HOME"/.local/bin/bxwm &
sleep 1
# Now start the rest of the session
"$HOME"/.local/bin/bxbarrc.lua | "$HOME"/.local/bin/bxbar &
"$HOME"/.local/bin/bxhkd &
wait
```