• This repository has been archived on 25/Jun/2024
  • Stars
    star
    302
  • Rank 138,030 (Top 3 %)
  • Language
    Go
  • License
    Apache License 2.0
  • Created almost 8 years ago
  • Updated 5 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

An i3status alternative in golang

Logo

Barista

Release GoDoc Maintainability Test Coverage

Barista is an i3 status bar written in golang.

This is not an official Google product

Features

  • Based on push rather than fixed interval polling. This allows immediate updates for many modules, like volume, media, shell, etc.

  • Produces a single binary via go build. This makes it easy to set up the bar executable, since no import paths, environment variables, et al. need to be configured.

  • Good click handlers (especially media and volume), since we can wait for a command and update the bar immediately rather than waiting for the next 'tick'.

  • Configuration is code, providing oodles of customization options without needing myriad configuration options in a file somewhere. If/then/else, loops, functions, variables, and even other go packages can all be used seamlessly.

Usage

See samples/sample-bar.go for a sample bar.

To build your own bar, simply create a package main go file, import and configure the modules you wish to use, and call barista.Run().

To show your bar in i3, set the status_command of a bar { ... } section to be the newly built bar binary, e.g.

bar {
  position top
  status_command exec ~/bin/mybar
  font pango:DejaVu Sans Mono 10
}

See the quickstart for more details.