The Barista Logo

barista

An i3status alternative in golang

Download sample-bar Download i3status example View on GitHub

Gmail

godoc
import "barista.run/modules/gsuite/gmail"

Show the number of unread threads in the inbox: gmail.New(/* client config */).
Show the number of unread threads in one or more labels: gmail.New(/* client config */, "label1", "other label").

Shows the number of unread Gmail messages in the specified labels (defaulting to “INBOX” if none). It uses the standard oauth package.

Configuration

Example

G:0/2/10
G:4/0/14

Show unread threads in two labels and total threads (read and unread):

gmail.New("INBOX", "other label").Output(func(i gmail.Info) bar.Output {
	return outputs.Textf("G:%d/%d/%d",
		n.Unread["INBOX"], n.Unread["other label"], n.TotalThreads())
})

Data: type Info struct

Fields

Methods