func defaultClickHandler(i Info) func(bar.Event) {
	return func(e bar.Event) {
		switch e.Button {
		case bar.ButtonLeft:
			i.PlayPause()
		case bar.ScrollDown, bar.ScrollRight:
			if seekLimiter.Allow() {
				i.Seek(time.Second)
			}
		case bar.ButtonBack:
			i.Previous()
		case bar.ScrollUp, bar.ScrollLeft:
			if seekLimiter.Allow() {
				i.Seek(-time.Second)
			}
		case bar.ButtonForward:
			i.Next()
		}
	}
}
defaultClickHandler provides useful behaviour out of the box,
Click to play/pause, scroll to seek, and back/forward to switch tracks.
package media  
import (
	"fmt"
	"strings"
	"time"
	"barista.run/bar"
	"barista.run/base/value"
	"barista.run/base/watchers/dbus"
	l "barista.run/logging"
	"barista.run/outputs"
	"golang.org/x/time/rate"
)
type PlaybackStatus string
const (
	Disconnected = PlaybackStatus("")
	Playing = PlaybackStatus("Playing")
	Paused = PlaybackStatus("Paused")
	Stopped = PlaybackStatus("Stopped")
)
type Info struct {
	PlayerName     string
	PlaybackStatus PlaybackStatus
	Shuffle        bool
	Length      time.Duration
	Title       string
	Artist      string
	Album       string
	AlbumArtist string
	ArtURL string
	lastUpdated  time.Time
	lastPosition time.Duration
	rate         float64
	trackID string
	call func(string, ...interface{}) ([]interface{}, error)
}
type Module struct {
	playerName value.Value  
	outputFunc value.Value  
}
func New(player string) *Module {
	m := new(Module)
	m.playerName.Set(player)
	l.Label(m, player)
	l.Register(m, "playerName", "outputFunc")
	m.Output(func(i Info) bar.Output {
		if i.Playing() {
			return outputs.Repeat(func(time.Time) bar.Output {
				return outputs.Textf("%v: %s", i.TruncatedPosition("s"), i.Title)
			}).Every(time.Second)
		}
		if i.Connected() {
			return outputs.Text(i.Title)
		}
		return nil
	})
	return m
}
func (m *Module) Player(player string) *Module {
	l.Label(m, player)
	m.playerName.Set(player)
	return m
}
func (m *Module) Output(outputFunc func(Info) bar.Output) *Module {
	m.outputFunc.Set(outputFunc)
	return m
}
func (m *Module) RepeatingOutput(outputFunc func(Info) bar.Output) *Module {
	return m.Output(func(i Info) bar.Output {
		if i.Playing() {
			return outputs.Repeat(func(time.Time) bar.Output {
				return outputFunc(i)
			}).Every(time.Second)
		}
		return outputFunc(i)
	})
}
type AutoModule struct {
	module   *Module
	excluded map[string]bool
}
func Auto(excluding ...string) *AutoModule {
	excluded := map[string]bool{}
	for _, e := range excluding {
		excluded[e] = true
	}
	m := &AutoModule{New(""), excluded}
	l.Attach(m.module, m, "~auto")
	return m
}
func (m *AutoModule) Output(outputFunc func(Info) bar.Output) *AutoModule {
	m.module.Output(outputFunc)
	return m
}
func (m *AutoModule) RepeatingOutput(outputFunc func(Info) bar.Output) *AutoModule {
	m.module.RepeatingOutput(outputFunc)
	return m
}
var seekLimiter = rate.NewLimiter(rate.Every(50*time.Millisecond), 1)