Song table format
An array of Property
objects which serve as a template for table of songs thathat are currently in the queue. Each
property is a song_table_format
.
song_table_column
Describes a single column in the song table. This is a recursive data structure. Whenever a property is not defined the
default
fallback is used. This fallback can also have a default value.
prop
Property of the song to display in the column. Described in its own section
width
Portion of the table width reserved for this column. Can be one of:
- Exact value:
"5"
which will result in 5 column width - Percentage:
"50%"
which will result in half the table width
alignment
Percentage of the table reserved for this column. Sum of these value must be 100.
label
Optional label for the column. Displayed in the table header. Name of the property is used if not provided.
property
kind
What property to display. Described in its own section
style
Style for the property.
default
This is a normal property. It is used as a fallback value when the current property is not defined
property_kind
Kind can be one of three values, static Text
, Group
or Property
which shows one of the metadata tags which are present on the
song. There are a few predefined tags that can be used, but a special value is provided to display any arbitraty tag.
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.
Group
None
value, the whole group is
considered None
and the default value is used.
Consider the following example:
If the artist
or the title
of the song is missing in its metadata, the whole group will be skipped, including the Text
property and the song’s filename
will be displayed instead. A group can also contain another group.
Property
Will display value of the respective tag from the song. Since tags are not guaranteed to be present, a fallback value
can be specified with the default
field. Since song files can have arbitrary tags the Other
variant can be used to
display any tag, even those not explicitly supported by rmpc.
Example
This configuration displays a table with single column. This column displays the Artist of the song if it is present and “Unknown Artist” with red foreground and black background otherwise.