Waybar icon indicating copy to clipboard operation
Waybar copied to clipboard

MPRIS block: `dynamic-len` ignored

Open LordMZTE opened this issue 1 year ago • 0 comments

The dynamic-len setting of the mpris block doesn't seem to be respected, the text length often going way beyond the set limit.

Version info

$ waybar --version
Waybar v0.10.4

To reproduce

  1. Configure the MPRIS block with this config:
{
    "format": "{status_icon} {dynamic}",
    "interval": 5,
    "dynamic-len": 24,
    "dynamic-separators": " 󱓜 ",
    "dynamic-order": [
        "title",
        "artist",
        "position",
        "length"
    ],
    "dynamic-importance-order": [
        "position",
        "length",
        "artist",
        "album"
    ],
    "status-icons": {
        "playing": "󰏤",
        "paused": "󰐊",
        "stopped": "󰓛"
    }
}
  1. Play content with a long title.
  2. Observe that the length (here: 24 characters) is exceeded.

Screenshots

screenshot Here, we see the MPRIS block with the above configuration displaying content over 24 characters.

My full config

My full config's source code (which is compiled by my pre-processor confgen) is available here.

LordMZTE avatar Aug 10 '24 16:08 LordMZTE