The Barista Logo

barista

An i3status alternative in golang

Download sample-bar Download i3status example View on GitHub

Quickstart

Screenshot of sample bar in summary mode
Screenshot of sample bar in sysinfo mode
Screenshot of sample bar in battery mode
Screenshot of sample bar in weather mode
Screenshot of sample bar in timezones mode

If the icons are missing from the bar, you may need to install the icon fonts to ~/Github/, or adjust the code if they are already available in a different location.

See Customising Barista for how to get started with building your own version, where you can customise the output format, the modules and their order, and add arbitrary go code.

Built-in Modules

Barista provides several modules out of the box:

In addition to simple modules, barista also allows grouping several modules together and selectively displaying their output on the bar. For example, group/switching can be used to show a single module from a group of many, and switch between them using buttons. See group for more details.

Formatting Output

Most modules allow specifying a custom function that receives some data related to the module, and returns the output to be displayed on the bar. Some simple output functions are available in the outputs package.

When using a pango font, i3bar also supports Pango Markup, which can be used for rich in-line text formatting and icon fonts. Barista provides the pango package for constructing and manipulating output that uses pango markup.

Custom Modules

Writing a custom barista module is fairly straightforward. Anything that can be done in a go program can usually be adapted to display something on a barista bar.

If the module is polling something on an interval, it’s easiest to write a go function and call it using funcs.Every(). See an example in the funcs package.

Or if you just need the output from a command, use the shell package. Some examples of shell commands being used for bar output are available in the package documentation.

For more details and a complete example, see the guide to writing a module. For an example of integrating a third-party go package, see the yubikey sample module.

Community Modules

There are also other barista modules out there which are maintained by the community: