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

Tabs

tabs: <tab[]>

Provides an abiliy to configure what tabs are shown by rmpc. Each tab contains one or more panes. Panes can be laid out how you want by splitting them via nesting multiple pane layouts. Each pane_type can be displayed multiple times in one or more tabs, but ultimately it is a single instance of the given pane. Check out the default config for reference.

tab: (name: "<string>", pane: Pane | Split | Component)

A single tab that will be shown by rmpc. Each tab has a name that is displayed in the tab bar and either a single or multiple Panes.

name: "<string>"

Each tab has a name which will be displayed in the tab bar and can be used in the SwitchToTab(<name>) keybind.

pane_type to display in the given Pane. Can be etither Split or Pane. Split means that given pane will be split into multiple sub panes. Pane simply displays the given pane_type.

  • Pane(<pane_type>) - Displays the given pane type itself.
  • Split(direction: Horizontal | Vertical, borders: <borders>, panes: <sub_panes[]>) splits the pane into multiple sub panes. Each split has a direction and a list of sub panes. More info on borders in their section.
  • Component("<component_name>") - Displays a component
direction: Horizontal | Vertical

Determines which direction the pane will be split into.

panes: (size: '50%', borders: <borders>, pane: Split() | Pane(<pane_type>)

Sub panes for the given split. The size can be either percent (50%), exact value(3) or a ratio (0.4r).

  • Exact value will reserve exactly that many rows/columns
  • Percent value will reserve that portion of available space
  • Ratio will take parent container’s other size (if you are splitting horizontally it will take parent’s height and if vertically then it will take parent’s width) and multiply it with this number. The result is then rounded and used as an exact size. Useful to for example keep AlbumArt as square size at all times. Note that the sizes here are in terminal cell width/height and not pixels.

Each sub pane can be either a Pane or another Split. Sub pane can also have borders, more info in their section.

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

  • AlbumArt - The album art. Cannot be focused.
  • Cava - Displays a music visualiser using Cava. More info on its own page.
  • Queue - Table of the current song queue.
  • Directories - Browse 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 ;.
  • Artists - Browse music library by artist tag. Equivalent to Browser(root_tag: "artist")
  • AlbumArtists - Browse music library by albumartist tag. Equivalent to Browser(root_tag: "albumartist")
  • Albums - Browse music library by album tag.
  • Playlists - Browse saved playlists.
  • Search - Search music library.
  • Lyrics - Display synced lyrics.
  • ProgressBar - Displays the progress of the currently playing song
  • Header - Displays various information about the current song and MPD’s states, configurable in your theme
  • Tabs - Displays a simple tab bar showing what tabs are available and which one is active
  • Property - A special pane which can display any property as described in the Header config including styling, default values etc. Check the Example for more info.
borders: "NONE" | "ALL" | "LEFT" | "RIGHT" | "TOP" | "BOTTOM"

Define what borders are rendered around a tab or one of its panes. Default is "NONE", meaning no borders. By specifying "ALL" the borders will be on all sides of the pane/tab. The above values can also be combined, if you for example want borders on the left and right, you can achieve it by defining "LEFT" | "RIGHT".

Some tabs config examples below.

Single tab with queue and album art, with a border between them and also border around the whole split.

Click to expand
tabs: [
(
name: "Queue",
pane: Split(
direction: Horizontal,
borders: "ALL",
panes: [
(
size: "40%",
borders: "RIGHT",
pane: Pane(AlbumArt),
),
(
size: "60%",
pane: Pane(Queue),
),
],
),
),
],

You have to use Split here even for a single pane if you want a border.

Click to expand
tabs: [
(
name: "Tab",
pane: Split(
direction: Horizontal,
borders: "LEFT | RIGHT",
panes: [
(
size: "100%",
pane: Pane(Queue),
),
],
),
),
],

This config displays the AlbumArt and Queue panes and below them there are Property with pane with StateV2, ProgressBar pane and another Property pane with combination of Elapsed and Duration status properties next to each other in a line.

The Property pane also scrolls around and cycles if the content is longer than its defined area when scroll_speed is set to a value higher than 0. The value determines how fast the Property pane cycles in columns per second. This is tied to the elapsed time of the currently playing song. This is disabled when set to 0 or not set at all.

Click to expand
tabs: [
(
name: "Test",
pane: Split(
direction: Vertical,
panes: [
(
size: "100%",
borders: "ALL",
pane: Split(
borders: "ALL",
direction: Horizontal,
panes: [
(
size: "40%",
borders: "RIGHT",
pane: Pane(AlbumArt),
),
(
size: "60%",
pane: Pane(Queue),
),
],
),
),
(
size: "3",
borders: "ALL",
pane: Split(
direction: Horizontal,
panes: [
(
pane: Pane(Property(content: [(kind: Property(Status(StateV2())))], align: Left)),
size: "10",
),
(
size: "100%",
pane: Pane(ProgressBar),
),
(
size: "25",
pane: 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,
)),
),
]
),
),
],
),
),
],
Example property pane