Skip to content
This page is for the development version of rmpc. Make sure your version matches the selected documentation.

Properties

You can use the so-called properties in various places in rmpc. These allow you to customize what information is shown and how the program looks as a whole. These properties are usable in the layout, tabs, browser_song_format, song_table_format, and components.

prop: (kind: <kind>, style: <style>, default: <prop>)

Every definition is a struct which contains kind, style, and default. The default is simply another property which is used as a fallback value if the first property could not be resolved.

Style is a struct with three properties: fg, bg, and modifiers, and is described in more detail here.

The kind one of the available kinds. The Property kind can then be either Song, Status, or Widget. Or, in the case of song_table_format or browser_song_format, just the Song type is available.

There are some variations in the kind definition. For example, the Property panes allow you to use all property kinds, ie. Property(Status(..)). But the song_table_format and browser_song_format allow only the Song property kind thus the Property type is omitted: ie. Property(Title) instead of Property(Song(Title)).

The properties are divided into a few categories:

TypeDescription
TextDisplays a raw text value
Example
(kind: Text("Hello world!")),
StickerDisplays sticker value of a song. These stickers can be used to, for example, track play count of songs
Example
(kind: Sticker("playCount")),
GroupGroups one or more properties together. If any of the properties resolves to an empty value, the whole group will not be shown.
Example

Displays artist - title but if either artist or the title are not present in the metadata "Unknown" is shown instead.

(kind: Group([(kind: Property(Song(Artist))), (kind: Text("-")), (kind: Property(Song(Title)))]), default: (kind: Text("Unknown"))),
TransformApplies a transformation on the properties in question, like truncating the value to a specified number of characters.
Example

Check the tables below for examples

PropertyDisplays song's metadata values or information about rmpc's and MPD's status. These properties are further divided into three categories:
Song - Displays metadata of either the currently playing song or controls format of songs in lists and tables depending on the context.
Status - Displays rmpc's or MPD's status like the playback state, volume, currently active tab, and others.
Widget - More involved properties with custom display options; these are mostly obsolete nowadays and kept for backward compatibility.

Only the Song type is available in song_table_format or browser_song_format and the category name (Song) is omitted there.
Example

Check the tables below for examples

Below are tables showing all available properties. The table rows are expandable and contain info about parameters and examples. All the examples below assume that the properties are NOT used in the song_table_format or browser_song_format.

PropertyDescription
FileSong's full path from MPD's music directory
Example
(kind: Property(Song(File))),
FilenameSong's filename
Example
(kind: Property(Song(Filename))),
FileExtensionSong's file extension
Example
(kind: Property(Song(FileExtension))),
TitleValue of the title tag
Example
(kind: Property(Song(Title))),
ArtistValue of the artist tag
Example
(kind: Property(Song(Artist))),
AlbumValue of the album tag
Example
(kind: Property(Song(Album))),
DurationSong's duration
Example
(kind: Property(Song(Duration))),
TrackValue of the track tag
Example
(kind: Property(Song(Track))),
DiscValue of the disc tag
Example
(kind: Property(Song(Disc))),
PositionValue of the position tag
Example
(kind: Property(Song(Position))),
SampleRate()Sample rate of the file
Example
(kind: Property(Song(SampleRate()))),
Bits()Bit depth (bits per sample) of the file
Example
(kind: Property(Song(Bits()))),
Channels()Channel count of the file
Example
(kind: Property(Song(Channels()))),
Added()Timestamp when the song was added to the database
Example
(kind: Property(Song(Added()))),
LastModified()Last modified date of the song file
Example
(kind: Property(Song(LastModified()))),
Other(value)Display any arbitrary metadata tag supported by MPD
Parameters
  • value: String, required, name of the tag to display
Example

Display value of the albumartist tag

(kind: Property(Song(Other("albumartist")))),
PropertyDescription
VolumeCurrent volume as number from 0 to 100
Example
(kind: Property(Status(Volume))),
StateV2(...)Current playback state, one of Playing, Paused, Stopped
Parameters
  • playing_label: String, optional, defaults to Playing
  • paused_label: String, optional, defaults to Paused
  • stopped_label: String, optional, defaults to Stopped
  • playing_style: Style, optional
  • paused_style: Style, optional
  • stopped_style: Style, optional
Example
(kind: Property(Status(StateV2(playing_label: "P", paused_label: "||", stopped_label: "S", playing_style: (fg: "blue"), paused_style: (fg: "yellow"), stopped_style: (fg: "red"))))),
RepeatV2(...)Repeat status
Parameters
  • on_label: String, optional, defaults to On
  • off_label: String, optional, defaults to Off
  • on_style: Style, optional
  • off_style: Style, optional
Example
(kind: Property(Status(RepeatV2(on_label: "ON", off_label: "OFF", on_style: (fg: "blue"), on_off: (fg: "red"))))),
RandomV2(...)Random status
Parameters
  • on_label: String, optional, defaults to On
  • off_label: String, optional, defaults to Off
  • on_style: Style, optional
  • off_style: Style, optional
Example
(kind: Property(Status(SingleV2(on_label: "ON", off_label: "OFF", on_style: (fg: "blue"), on_off: (fg: "red"))))),
SingleV2(...)Single status
Parameters
  • on_label: String, optional, defaults to On
  • off_label: String, optional, defaults to Off
  • oneshot_label: String, optional, defaults to Oneshot
  • on_style: Style, optional
  • off_style: Style, optional
  • oneshot_style: Style, optional
Example
(kind: Property(Status(SingleV2(on_label: "ON", off_label: "OFF", oneshot_label: "OS_ON", on_style: (fg: "blue"), on_off: (fg: "red"), oneshot_style: (fg: "yellow"))))),
ConsumeV2(...)Consume status
Parameters
  • on_label: String, optional, defaults to On
  • off_label: String, optional, defaults to Off
  • oneshot_label: String, optional, defaults to Oneshot
  • on_style: Style, optional
  • off_style: Style, optional
  • oneshot_style: Style, optional
Example
(kind: Property(Status(ConsumeV2(on_label: "ON", off_label: "OFF", oneshot_label: "OS_ON", on_style: (fg: "blue"), on_off: (fg: "red"), oneshot_style: (fg: "yellow"))))),
PartitionCurrently active partition
Example
(kind: Property(Status(Partition))),
ElapsedHow much of the currently playing song has elapsed
Example
(kind: Property(Status(Elapsed))),
DurationTotal duration of the currently playing song
Example
(kind: Property(Status(Duration))),
CrossfadeNumber of crossfade seconds
Example
(kind: Property(Status(Crossfade))),
BitrateCurrently playing song's bitrate in kbps
Example
(kind: Property(Status(Bitrate))),
QueueLength(...)Number of songs in the queue
Parameters
  • thousands_separator: String, optional, defaults to ,
Example
(kind: Property(Status(QueueLength(thousands_separator: ",")))),
QueueTimeTotal(...)Total duration of songs in the queue
Parameters
  • separator: String, optional
Example
  • When separator is None (default): Uses standard time format (e.g., 4:06, 1:23:45)
  • When separator is provided (, in the example): Uses verbose format with abbreviated units (e.g., 4m, 6s, 1h, 23m, 45s)
(kind: Property(Status(QueueTimeTotal()))) // "4:06" (default, no separator)
(kind: Property(Status(QueueTimeTotal(separator: ",")))) // "4m,6s"
(kind: Property(Status(QueueTimeTotal(separator: " ")))) // "4m 6s"
(kind: Property(Status(QueueTimeTotal(separator: "")))) // "4m6s" (no space)
QueueTimeRemaining(...)Total time left in the queue (remainder of current song + the rest of the queue)
Parameters
  • separator: String, optional
Example
  • When separator is None (default): Uses standard time format (e.g., 4:06, 1:23:45)
  • When separator is provided (, in the example): Uses verbose format with abbreviated units (e.g., 4m, 6s, 1h, 23m, 45s)
(kind: Property(Status(QueueTimeRemaining()))) // "2:34" (default, no separator)
(kind: Property(Status(QueueTimeRemaining(separator: ",")))) // "2m,34s"
(kind: Property(Status(QueueTimeRemaining(separator: " ")))) // "2m 34s"
(kind: Property(Status(QueueTimeRemaining(separator: "")))) // "2m34s" (no space)
ActiveTabCurrently active tab
Example
(kind: Property(Status(ActiveTab))),
InputBuffer()Currently queued inputs
Example
(kind: Property(Status(InputBuffer()))),
InputMode()Shows whether rmpc is in insert or normal mode
Example
(kind: Property(Status(InputMode()))),
SampleRate()Sample rate of the currently playing file
Example
(kind: Property(Status(SampleRate()))),
Bits()Bit depth (bits per sample) of the currently playing file
Example
(kind: Property(Status(Bits()))),
Channels()Channel count of the currently playing file
Example
(kind: Property(Status(Channels()))),
PropertyDescription
ScanStatusDisplays a spinner when MPD's database update is in progress
Example
(kind: Property(Widget(ScanStatus))),
States(...)Playback modifiers in format Repeat / Random / Consume / Single
Parameters
  • active_style: Style, optional
  • separator_style: Style, optional
Example
(kind: Property(Widget(States(active_style: (fg: "blue"), separator_style: (fg: "gray"))))),
VolumeCurrent volume in format: Volume: ▁▂▃▄▅▆▇ 100%
Example
(kind: Property(Widget(Volume))),
TransformDescription
Truncate(...)Truncate the value to specified number of characters
Parameters
  • content: Property, content that is to be truncated
  • from_start: bool, optional, whether to truncate from the start of the input
  • length: number, length in characters to truncate to
Example

Show value of the date tag and truncates it to the first 4 characters: 2025-01-01 -> 2025

(kind: Transform(Truncate(content: (kind: Property(Song(Other("date")))), length: 4, from_start: false)))
Replace(...)Replace the value with another property if matched
Parameters
  • content: Property, content that is to be replaced if matched
  • replacements: array of objects to defining one or more replacements
Example

Replace the liked sticker value with a heart emoji

(kind: Transform(Replace(content: (kind: Sticker("like")), replacements: [
(match: "0", replace: (kind: Text("💔"))), // Replace "disliked" with a broken heart
(match: "1", replace: (kind: Text("💙"))), // Replace "neutral" with a blue hearst
(match: "2", replace: (kind: Text("❤️"))), // Replace "liked" with a red heart
])))