Building your own bar requires a few additional steps, because we cannot distribute API keys or client secrets in an open source project.
The simplest way to build a custom bar is to start with
as a template, and experiment with changes to the file.
- Setup the
go get barista.run
- Download the sources:
curl -L https://git.io/fxw62 -o mybar.go
- To make it easier to work with the placeholders in this file, download the build script:
curl -L https://git.io/fA7iZ -o build.sh chmod +x build.sh
TARGET_FILEto point to the go file with the placeholders. For example,
- Set up the necessary OAuth and API keys in
~/.config/barista/keys, following the format:
OWM_API_KEY="..." GITHUB_CLIENT_ID="..." GITHUB_CLIENT_SECRET="..."
./build.sh, with any arguments that you would pass to
go build, e.g.
./build.sh -o ~/bin/mybar -i mybar.go
- Restart i3 to see the changes
The rest of the steps, for saving oauth tokens and setting up icon fonts, are the same as the quickstart.
Caching HTTP Requests for Development
When customising the bar, you may need to rebuild and restart the bar a lot, and each restart will
issue HTTP requests to external services (weather, calendar, etc.). To avoid consuming excessive
quota during development, it may be desirable to use the
See the package documentation for a simple example of setting up global HTTP caching for the binary. Remember to remove the caching once you’re satisfied with your barista setup.
OAuth and Client Keys
Quick links to the sign-up pages for the various available services: