Documentation ¶
Index ¶
- type Device
- type Elapsed
- type Fragment
- func NewDevice(a api.API, param string) Fragment
- func NewElapsed(a api.API, param string) Fragment
- func NewFragment(a api.API, stmt *FragmentStatement) (Fragment, error)
- func NewLiked(a api.API, param string) Fragment
- func NewList(a api.API, param string) Fragment
- func NewMode(a api.API, param string) Fragment
- func NewShortname(a api.API, param string) Fragment
- func NewState(a api.API, param string) Fragment
- func NewSyncStatus(a api.API, param string) Fragment
- func NewTag(a api.API, param string) Fragment
- func NewText(s string) Fragment
- func NewTime(a api.API, param string) Fragment
- func NewVersion(a api.API, param string) Fragment
- func NewVolume(a api.API, param string) Fragment
- type FragmentStatement
- type Liked
- type List
- type MatrixStatement
- type Mode
- type Parser
- type PieceStatement
- type RowStatement
- type Shortname
- type State
- type SyncStatus
- type Tag
- type Text
- type Time
- type Version
- type Volume
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Device ¶
type Device struct {
// contains filtered or unexported fields
}
Device shows information about the currently playing music device.
type Elapsed ¶
type Elapsed struct {
// contains filtered or unexported fields
}
Elapsed draws the current song's elapsed time.
type Fragment ¶
type Fragment interface { // Text returns a string that should be drawn, // along with its stylesheet identifier. Text() (string, string) }
Fragment is the smallest possible unit in a topbar.
func NewFragment ¶
func NewFragment(a api.API, stmt *FragmentStatement) (Fragment, error)
NewFragment constructs a new Fragment based on a parsed topbar fragment statement.
func NewShortname ¶
NewShortname returns Shortname.
type FragmentStatement ¶
FragmentStatement holds information about a fragment, e.g.:
${variable|param} or: frag2
type Liked ¶
type Liked struct {
// contains filtered or unexported fields
}
State draws the current player state as an ASCII symbol.
type List ¶
type List struct {
// contains filtered or unexported fields
}
List draws information about the current songlist.
type MatrixStatement ¶
type MatrixStatement struct {
Rows []*RowStatement
}
MatrixStatement is an initialization of a complete topbar, e.g.:
${variable|param} frag2|text2|text3;row1.1|row1.2|row1.3
type Mode ¶
type Mode struct {
// contains filtered or unexported fields
}
Mode draws the four player modes as single characters.
type Parser ¶
Parser represents a parser.
func (*Parser) ParseFragment ¶
func (p *Parser) ParseFragment() (*FragmentStatement, error)
ParseFragment parses a fragment statement.
func (*Parser) ParseMatrix ¶
func (p *Parser) ParseMatrix() (*MatrixStatement, error)
ParseMatrix parses a matrix statement.
func (*Parser) ParsePiece ¶
func (p *Parser) ParsePiece() (*PieceStatement, error)
ParsePiece parses a piece statement.
func (*Parser) ParseRow ¶
func (p *Parser) ParseRow() (*RowStatement, error)
ParsePiece parses a row statement.
type PieceStatement ¶
type PieceStatement struct {
Fragments []*FragmentStatement
}
PieceStatement holds information about a piece, e.g.:
${variable|param} frag2
type RowStatement ¶
type RowStatement struct {
Pieces []*PieceStatement
}
RowStatement holds information about a row, e.g.:
${variable|param} frag2|text2|text3
type Shortname ¶
type Shortname struct {
// contains filtered or unexported fields
}
Shortname draws the short name of this application, as defined in the version module.
type State ¶
type State struct {
// contains filtered or unexported fields
}
State draws the current player state as an ASCII symbol.
type SyncStatus ¶
type SyncStatus struct {
// contains filtered or unexported fields
}
SyncStatus shows a symbol if the playlist is not synced remotely.
type Tag ¶
type Tag struct {
// contains filtered or unexported fields
}
Tag draws song tags from the currently playing song.
type Text ¶
type Text struct {
// contains filtered or unexported fields
}
Text draws a literal text string.
type Time ¶
type Time struct {
// contains filtered or unexported fields
}
Time draws the current song's length.