Configuration

All settings live under the playbar.* namespace in VSCode’s settings.

Setting Default Description
playbar.format {playerIcon} {artist} - {title} Status bar format. See Format placeholders below.
playbar.maxLength 50 Max characters before truncation with ellipsis (or marquee scrolling, if enabled).
playbar.alignment right Status bar alignment (left or right).
playbar.priority 100 Status bar priority (higher = further from edges).
playbar.showControls true Show separate prev/play-pause/next status bar buttons.
playbar.preferredPlayer "" Preferred MPRIS player suffix (e.g. spotify). Empty = first available.
playbar.sidecarPath "" Path to the playbar binary. Empty = use bundled binary.
playbar.hidePausedAfterSeconds 0 Hide the bar after the player has been paused this many seconds. 0 disables.
playbar.hideIdleAfterSeconds 0 Hide the bar after the player has been stopped/idle this many seconds. 0 disables.
playbar.formatRules [] Ordered overrides. Each rule is { when: { field: regex, ... }, format: "..." }. First match wins.
playbar.playerIcons {} Override or extend the built-in {playerIcon} map. Keys are MPRIS bus suffixes; values are codicon strings.
playbar.marquee.enabled false Scroll the status bar text as a marquee when it exceeds maxLength, instead of truncating.
playbar.marquee.speedMs 300 Milliseconds between marquee shifts (lower = faster).
playbar.marquee.pauseEndsMs 1500 Milliseconds to pause when the marquee wraps back to the start.
playbar.marquee.gap " " Separator inserted between end and start of the marquee loop.

Format placeholders

The playbar.format string is rendered with these substitutions:

Placeholder Value
{playerIcon} Codicon for the active MPRIS player (see Player icons below)
{artist} Track artist
{title} Track title
{album} Album name
{position} Current playback position, mm:ss (or h:mm:ss over one hour)
{length} Track duration, same format as {position}
{player} MPRIS player identifier (e.g. spotify)
{status} playing, paused, stopped, or none

Missing fields render as empty and adjacent - separators collapse, so a format like "{playerIcon} {artist} - {title} [{position}/{length}]" degrades gracefully when a player does not expose position or album metadata.

You can also embed VSCode codicons via the $(icon-name) syntax:

{
  "playbar.format": "$(unmute) {artist} - {title}",
  "playbar.maxLength": 60
}

Per-media overrides

playbar.formatRules lets you swap the template for specific media. Each rule’s when block is a field-to-regex map (case-insensitive); all listed fields must match. Matchable fields: title, artist, album, player, status.

{
  "playbar.formatRules": [
    { "when": { "title": "Netflix" }, "format": "$(device-camera-video) Netflix" },
    { "when": { "player": "spotify" }, "format": "$(music) {artist} - {title}" }
  ]
}

Player icons

{playerIcon} resolves via a merged map (built-in defaults + the user setting playbar.playerIcons). Keys are the MPRIS bus suffix (state.player); values are codicon strings. Players that expose suffixes like firefox.instance_1_84 fall back to the prefix before the first dot.

{
  "playbar.playerIcons": {
    "spotify": "$(megaphone)",
    "amberol": "$(music)"
  }
}

Marquee scrolling

When the rendered status bar text is longer than playbar.maxLength, the default behavior is to truncate with an ellipsis. Set playbar.marquee.enabled to true to scroll the text instead:

{
  "playbar.marquee.enabled": true,
  "playbar.marquee.speedMs": 250,
  "playbar.marquee.pauseEndsMs": 2000,
  "playbar.marquee.gap": "   ***   "
}

gap is the visible separator stitched between the end of the text and the start when it loops; pauseEndsMs adds a short pause each time the marquee wraps so the beginning is readable.

Hover tooltip

Hovering the status bar item shows a richer view: the cover art (when the player exposes one), the track title, and the album with its release year in parentheses when available (e.g. Random Access Memories (2013)). No configuration is needed.

Picking a specific player

If multiple MPRIS players are running, set the preferred one by the suffix of its bus name (the part after org.mpris.MediaPlayer2.):

{
  "playbar.preferredPlayer": "spotify"
}

List currently exposed players:

busctl --user list | grep mpris