barista-contrib

Community modules and extensions for barista.

View barista-contrib on GitHub View barista on GitHub View official barista docs

Updates

godoc
import "github.com/martinohmann/barista-contrib/modules/updates"

Show available updates: updates.New(someProvider).

Updates supports displaying currently available updates using pluggable providers, with the ability to add custom providers fairly easily. Provider is just

type Provider interface {
	Updates() (Info, error)
}

The following update providers are available in barista-contrib:

Configuration

Examples

5 updates

Show updates if available and display package details using beeep on left-click:

updates.New(yay.New()).Output(func(info updates.Info) bar.Output {
  if info.Updates == 0 {
    return nil
  }

  return outputs.Textf("%d updates", info.Updates).
    OnClick(click.Left(func() {
      beeep.Notify("Available Pacman Updates", info.PackageDetails.String(), "")
    }))
})

Data: type Info struct

Fields