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.
QueueHeader()Header for the current queue, complimentary to the Queue pane
DirectoriesBrowse music library by directory.
Browser()A 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.
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.
Volume()Interactive volume slider with mouse support. Supports Volume(kind: Slider(<config>)) configuration. More info in the Example
Empty()An empty pane, a noop. Can be used as a spacer in your layout.
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: [
(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 - An object with 5 one character long strings:

    • start - Symbol at the beginning of the slider (default: ”♪”)
    • filled - Symbol for the filled portion (default: ”─”)
    • thumb - Symbol for the current position indicator (default: ”●”)
    • track - 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: (
start: "",
filled: "",
thumb: "",
track: "",
end: "",
),
track_style: (fg: "gray"),
filled_style: (fg: "green"),
thumb_style: (fg: "white"),
)
)

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

(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.