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.
Definition
Section titled “Definition”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)).
Available kinds
Section titled “Available kinds”The properties are divided into a few categories:
| Type | Description | |
|---|---|---|
Text | Displays a raw text value | |
Example | ||
Sticker | Displays sticker value of a song. These stickers can be used to, for example, track play count of songs | |
Example | ||
Group | Groups one or more properties together. If any of the properties resolves to an empty value, the whole group will not be shown. | |
ExampleDisplays | ||
Transform | Applies a transformation on the properties in question, like truncating the value to a specified number of characters. | |
ExampleCheck the tables below for examples | ||
Property | Displays 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. | |
ExampleCheck the tables below for examples | ||
Available property kinds
Section titled “Available property kinds”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.
Song properties
Section titled “Song properties”| Property | Description | |
|---|---|---|
File | Song's full path from MPD's music directory | |
Example | ||
Filename | Song's filename | |
Example | ||
FileExtension | Song's file extension | |
Example | ||
Title | Value of the title tag | |
Example | ||
Artist | Value of the artist tag | |
Example | ||
Album | Value of the album tag | |
Example | ||
Duration | Song's duration | |
Example | ||
Track | Value of the track tag | |
Example | ||
Disc | Value of the disc tag | |
Example | ||
Position | Value of the position tag | |
Example | ||
SampleRate() | Sample rate of the file | |
Example | ||
Bits() | Bit depth (bits per sample) of the file | |
Example | ||
Channels() | Channel count of the file | |
Example | ||
Added() | Timestamp when the song was added to the database | |
Example | ||
LastModified() | Last modified date of the song file | |
Example | ||
Other(value) | Display any arbitrary metadata tag supported by MPD | |
Parameters
ExampleDisplay value of the albumartist tag | ||
Status properties
Section titled “Status properties”| Property | Description | |
|---|---|---|
Volume | Current volume as number from 0 to 100 | |
Example | ||
StateV2(...) | Current playback state, one of Playing, Paused, Stopped | |
Parameters
Example | ||
RepeatV2(...) | Repeat status | |
Parameters
Example | ||
RandomV2(...) | Random status | |
Parameters
Example | ||
SingleV2(...) | Single status | |
Parameters
Example | ||
ConsumeV2(...) | Consume status | |
Parameters
Example | ||
Partition | Currently active partition | |
Example | ||
Elapsed | How much of the currently playing song has elapsed | |
Example | ||
Duration | Total duration of the currently playing song | |
Example | ||
Crossfade | Number of crossfade seconds | |
Example | ||
Bitrate | Currently playing song's bitrate in kbps | |
Example | ||
QueueLength(...) | Number of songs in the queue | |
Parameters
Example | ||
QueueTimeTotal(...) | Total duration of songs in the queue | |
Parameters
Example
| ||
QueueTimeRemaining(...) | Total time left in the queue (remainder of current song + the rest of the queue) | |
Parameters
Example
| ||
ActiveTab | Currently active tab | |
Example | ||
InputBuffer() | Currently queued inputs | |
Example | ||
InputMode() | Shows whether rmpc is in insert or normal mode | |
Example | ||
SampleRate() | Sample rate of the currently playing file | |
Example | ||
Bits() | Bit depth (bits per sample) of the currently playing file | |
Example | ||
Channels() | Channel count of the currently playing file | |
Example | ||
Widget properties
Section titled “Widget properties”| Property | Description | |
|---|---|---|
ScanStatus | Displays a spinner when MPD's database update is in progress | |
Example | ||
States(...) | Playback modifiers in format Repeat / Random / Consume / Single | |
Parameters
Example | ||
Volume | Current volume in format: Volume: ▁▂▃▄▅▆▇ 100% | |
Example | ||
Transforms
Section titled “Transforms”| Transform | Description | |
|---|---|---|
Truncate(...) | Truncate the value to specified number of characters | |
Parameters
ExampleShow value of the date tag and truncates it to the first 4 characters: 2025-01-01 -> 2025 | ||
Replace(...) | Replace the value with another property if matched | |
Parameters
ExampleReplace the liked sticker value with a heart emoji | ||