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

Panes

Panes can be used either in your layout or in your tabs. They allow you to control what is displayed where and mix and match them to your liking.

Rmpc has several pane_types which can be displayed. These are:

Pane
Description
AlbumArtThe album art. Cannot be focused.
CavaDisplays a music visualiser using Cava. More info on its own page.
QueueTable of the current song queue.
DirectoriesBrowse music library by directory.
BrowserA music library browser. Allows you to specify a root tag and an optional separator. Browser(root_tag: "<tag>", separator: ";"). Separator can be used to create multiple entries from one tag value, for example if a song has multiple genre values separated by ;.
ArtistsBrowse music library by artist tag. Equivalent to Browser(root_tag: "artist")
AlbumArtistsBrowse music library by albumartist tag. Equivalent to Browser(root_tag: "albumartist")
AlbumsBrowse music library by album tag.
PlaylistsBrowse saved playlists.
SearchSearch music library.
LyricsDisplay synced lyrics.
ProgressBarDisplays the progress of the currently playing song
HeaderDisplays various information about the current song and MPD’s states, configurable in your theme
TabsDisplays a simple tab bar showing what tabs are available and which one is active
PropertyA special pane which can display a list of properties including styling, default values etc. Check the Example for more info.
VolumeInteractive volume slider with mouse support. Supports Volume(kind: Slider(<config>)) configuration. More info in the Example
Property: Pane(Property(content: <property[]>, align: <Left | Right | Center>, scroll_speed: <number>))

The property pane, can be used to display one or more properties. The content of the pane can be aligned in case the pane’s size is bigger than its content. The content can also wrap scroll around in case it does not fit the pane’s size, this is controlled by the scroll_speed.

Displays the currently elapsed time followed with a forward slash and the current song’s total duration. After that a Group is used to show song’s bitrate in the format (999 kbps), the group ensures that no parentheses will be shown if the bitrate cannot be determined. The text will also wrap scroll if the pane is not big enough for the content.

Pane(Property(
content: "$elapsed ' / ' $cduration [' (' $bitrate ' kbps)']",
align: Right,
scroll_speed: 1,
)),

or equivalent:

Pane(Property(
content: [
(kind: Property(Status(Elapsed))),
(kind: Text(" / ")),
(kind: Property(Status(Duration))),
(kind: Group([
(kind: Text(" (")),
(kind: Property(Status(Bitrate))),
(kind: Text(" kbps)")),
])),
],
align: Right,
scroll_speed: 1,
)),
Browser: Pane(Browser(root_tag: <string>, separator: <string | None>))

A browser pane where the root level will be list of all root_tag values in your music database. The second level will all albums under that tag and the third and final level will be list of songs in the given album.

Separator allows you to synthesize multiple tags from a single value by splitting the value at the separator. The separator is optional and can be omitted.

For example: Pane(Browser(root_tag: "genre", separator: "/")) will show all genres in your music library at the root level, if any song has genre value of “genre1/genre2” then “genre1” and “genre2” will show as separate entries.

Volume: Pane(Volume(kind: Slider(<config>)))

The Volume pane provides an interactive volume slider with mouse support. You can click to set volume directly or use scroll wheel to adjust volume in steps.

Currently, only the Slider kind is supported.

kind: Slider(symbols: <symbols[]>, track_style: <style>, filled_style: <style>, thumb_style: <style>)

Configure the appearance of the volume slider:

  • symbols - Array of 5 strings defining the visual elements: [start, filled, thumb, empty, end]

    • start - Symbol at the beginning of the slider (default: ”♪”)
    • filled - Symbol for the filled portion (default: ”─”)
    • thumb - Symbol for the current position indicator (default: ”●”)
    • empty - Symbol for the empty portion (default: ”─”)
    • end - Symbol at the end of the slider (default: ”♫”)
  • filled_style - Style for the filled portion of the slider (default: blue foreground)

  • thumb_style - Style for the thumb/position indicator (default: blue foreground)

  • track_style - Style for the empty portion of the slider (default: dark gray foreground)

Volume(
kind: Slider(
symbols: ["🔈", "", "", "", "🔊"],
track_style: (fg: "gray"),
filled_style: (fg: "green"),
thumb_style: (fg: "white", bg: "green"),
)
)

This creates a volume slider with speaker icons at the ends, using green for the filled portion and a white thumb with green background.

header: <row[]>

Configuration of the header. Header is displayed at the top of the 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.

(left: <property>[], center: <property>[], right: <property>[])

Defines a single row in the header. Each row can have left, center and right configuration.

Describes a single segment (left, center or right) of the header. More info in the properties page.