Skip to content

media ​

Now-playing title and playback controls for the active MPRIS player.

Add it to your layout with media:

yaml
bar:
  layout:
    - monitor: "*"
      right: [media]

General ​

FieldTypeDefaultDescription
icon-typeMediaIconType"application-mapped"Icon display mode.
player-iconsmap of string{}Custom player-to-icon mappings for application-mapped mode.
players-ignoredarray of string[]Player bus name patterns to exclude from discovery. Requires a restart to take effect.
player-priorityarray of string[]Preferred player priority order as glob patterns matching bus names.
formatstring"{{ title }} - {{ artist }}"Format string for the label.
icon-namestring"ld-music-symbolic"Symbolic icon name for default mode.
spinning-disc-iconstring"ld-disc-3-symbolic"Icon shown for spinning-disc mode.
border-showboolfalseDisplay border around button.
icon-showbooltrueDisplay module icon.
label-showbooltrueDisplay text label.
label-max-lengthu3235Max label characters before truncation with ellipsis. Set to 0 to disable.
More about player-icons

Keys are glob patterns matching MPRIS bus names, values are icon names from the installed icon set. These override built-in mappings when matched.

Example ​

yaml
modules:
  media:
    player-icons:
      "*spotify*": si-spotify-symbolic
      "*firefox*": ld-globe-symbolic
      "*.mpv": ld-play-circle-symbolic
More about players-ignored

Example ​

yaml
modules:
  media:
    players-ignored: ["*chromium*", "*discord*"]
More about player-priority

When no player is manually selected, this determines which player becomes active. Patterns are checked in order; first match wins. If no pattern matches, the first playing player is selected.

Example ​

yaml
modules:
  media:
    player-priority: ["*spotify*", "*firefox*"]
More about format

Placeholders ​

  • {{ title }} - Track title
  • {{ artist }} - Artist name(s)
  • {{ album }} - Album name
  • {{ status }} - Playback status text (Playing, Paused, Stopped)
  • {{ status_icon }} - Playback status icon character

Examples ​

  • "{{ title }} - {{ artist }}" - "Bohemian Rhapsody - Queen"
  • "{{ status_icon }} {{ title }}" - "▶ Bohemian Rhapsody"
  • "{{ artist }}: {{ title }} ({{ album }})" - "Queen: Bohemian Rhapsody (A Night at the Opera)"

Colors ​

FieldTypeDefaultDescription
border-colorColorValue"blue"Border color token.
icon-colorColorValue"auto"Icon foreground color. Auto selects based on variant for contrast.
icon-bg-colorColorValue"blue"Icon container background color token.
label-colorColorValue"fg-default"Label text color token.
button-bg-colorColorValue"bg-surface-elevated"Button background color token.

Click actions ​

FieldTypeDefaultDescription
left-clickClickAction"dropdown:media"Action on left click.
right-clickClickAction""Action on right click.
middle-clickClickAction""Action on middle click.
scroll-upClickAction""Action on scroll up.
scroll-downClickAction""Action on scroll down.

Default configuration ​

yaml
modules:
  media:
    icon-type: application-mapped
    player-icons: {}
    players-ignored: []
    player-priority: []
    format: '{{ title }} - {{ artist }}'
    icon-name: ld-music-symbolic
    spinning-disc-icon: ld-disc-3-symbolic
    border-show: false
    border-color: blue
    icon-show: true
    icon-color: auto
    icon-bg-color: blue
    label-show: true
    label-color: fg-default
    label-max-length: 35
    button-bg-color: bg-surface-elevated
    left-click: dropdown:media
    right-click: ""
    middle-click: ""
    scroll-up: ""
    scroll-down: ""

Released under the MIT License.