Tabs
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
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 Pane
s.
name
Each tab has a name which will be displayed in the tab bar and can be used in the SwitchToTab(<name>)
keybind.
pane
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 | Split
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.
direction
Determines which direction the pane will be split into.
panes
Sub panes for the given split. The size can be either percent (50%
) or exact value(3
). Exact value will reserve exactly that many rows/columns.
Each sub pane can be either a Pane
or another Split
. Sub pane can also have borders, more info in their section.
pane_type
Rmpc has several pane_types which can be displayed. These are:
AlbumArt
- The album art. Cannot be focused.Queue
- Table of the current song queue.Directories
- Browse music library by directory.Artists
- Browse music library byartist
tag.AlbumArtists
- Browse music library byalbumartist
tag.Albums
- Browse music library byalbum
tag.Playlists
- Browse saved playlists.Search
- Search music library.Lyrics
- Display synced lyrics.ProgressBar
- Displays the progress of the currently playing songHeader
- Displays various information about the current song and MPD’s states, configurable in your themeTabs
- Displays a simple tab bar showing what tabs are available and which one is activeProperty
- 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
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"
.
Examples
Some tabs config examples below.
Single border between panes
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), ), ], ), ),],
Single pane tab, border on left and right
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), ), ], ), ),],
Property pane
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.
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, )), ), ] ), ), ], ), ),],
