barista
pista's more featureful successor.
Intended for use with dwm, but can just as well be adopted to anything else with a textual status area (like tmux).
Runs N shell commands (specified in configuration file), asynchronously reads lines from them and routes to N corresponding slots on the bar:
b +--------------+--------------+- ... ---+-------------+
a | slot_1 | slot_2 | | slot_N |
r +--------------+--------------+- ... ---+-------------+
^ ^ ^
| | |
+-+ +-+ +-+
| | | | | |
|S| |S| |S|
|T| |T| |T|
|D| |D| |D|
|O| |O| |O|
|U| |U| |U|
|T| |T| |T|
| | | | | |
|1| |2| |N|
| | | | | |
+-+ +-+ +-+
^ ^ ^
| | |
command_1 command_2 ... command_N
| | |
v v v
+-+ +-+ +-+
| | | | | |
|S| |S| |S|
|T| |T| |T|
|D| |D| |D|
|E| |E| |E|
|R| |R| |R|
|R| |R| |R|
| | | | | |
|1| |2| |N|
| | | | | |
+-+ +-+ +-+
| | |
v v v
l +--------+ +--------+ ... +--------+
o | file_1 | | file_2 | | file_N |
g +--------+ +--------+ ... +--------+
Each slot is given a TTL, after which, if there was no update, the slot is cleared - helping you spot broken commands and not fool yourself with stale data.
Each command's stderr is redirected to ~/.barista/feeds/$i-$name/log.
Install
cargo install barista- Ensure
~/.cargo/bin/is in yourPATH barista help
Use
Initial
- In terminal A, run
barista server, which will create~/.barista/directory and initialize default configuration - In terminal B, edit configuration file to your liking:
~/.barista/conf.toml - In terminal B, run
barista reload - See
barista helpfor more functionality
Normal
Normally you'd run barista server & from ~/.xinitrc (or similar). This will
run the commands you specified in config and set the bar at intervals you
specified in config.
While the barista server is running, you can ask it for changes and status from
any other terminal (they communicate via a Unix domain socket:
~/.barista/socket):
barista reloadto reload configuration after changing it at runtimebarista statusto see how each command is doing (last update, etc)barista offto stop the commands and clear the barbarista onto start the commands and start updating the bar