Header
Configuration of the header. Header is displayed at the top of te window. It can display info about current song, the
player state and custom widgets. It is an array of row
objects. The number of these rows determines how many rows are
going to be displayed in the header. If left empty, the header is not displayed at all. Each row can have left, center
and right configuration to display various information about the player state and currently playing song.
row
Defines a single row in the header. Each row can have left, center and right configuration.
header_property
Describes a single segment (left, center or right) of the header. This is a recursive data structure. Whenever a
property is not present, the default
fallback is used. This fallback can also have a default value.
kind
What property to display. Described in its own section
style
Style for the property.
default
This is a normal header property. It is used as a fallback value when the current property is not defined
header_property_kind
Kind can be one of two values, static Text
or Property
which can display song metadata, various player status info
or predefined widgets.
Text
Will display static text in the table. Mostly useful for default values. For example if a song is missing an album tag,
“Unknown Album” can be displayed by specifying Text("Unknown Album")
as the default.
Property
Can display values from currently playing song metadata, just like in the song table, info about the player status (volume, playing or stopped, current bitrate, …) or a predefined widget.
Property(Song)
This is similar to the SongProperty
but is used for the header. It can display information about the song that is
currently playing. The Other
variant can be used to display any tag, even those not explicitly supported by rmpc.
Property(Status)
These values display the current state of the player. For example, Volume
will display the current volume, Repeat
will display if the repeat mode is on or off, etc.
Property(Widget)
These are predefined “widgets” which you can use in your header. They differ from regular properties in that they can have additional styling options or display options.
Volume widget
Shows volume with percentage and bars instead of just simple number. It looks something like this: Volume: ▁▂▃▄▅▆▇ 100%
States widget
Offers additional styling for active and inactive state. Looks like this: Repeat / Random / Consume / Single. Where the active states are highlighted with the active style and the inactive states are highlighted with the inactive style. The ’/’ is highlighted with the separator style.
Example
This configuration displays a header with single row. On the left side there is player state (Playing/Paused/Stopped) in
yellow color inside brackets, ie. [Playing]
. In the center there is the title of the currently playing song in bold.
If there is no song playing, the text “No Song” is displayed. And on the right side there is the volume widget in blue
color.