matryer / xbar

Put the output from any script or program into your macOS Menu Bar (the BitBar reboot)
https://xbarapp.com
MIT License
17.52k stars 643 forks source link

Ellipsis ignores line break #912

Open moritztim opened 8 months ago

moritztim commented 8 months ago
Unternehmenskreis ❘ Basisprojekt  (Entwicklung / Fortbildung)  "Time Tracker" \n10:30 - 11:09                                                    󰑐  Neu Laden| font="JetBrainsMono Nerd Font" | trim="false"

Expected: First, line breaks are considered, then it calculates if an ellipsis is neccesary. Therefore two long lines get displayed. Actual: Seemingly it first checks if an ellipsis is necessary, without splitting by line breaks. Now the part where a line break was is replaced with and everything is rendered on one line.

Screenshot
moritztim commented 8 months ago

Argos handles this correctly: image

moritztim commented 8 months ago

adding an arbitrarily high length attribute does not work around this.

moritztim commented 8 months ago

It only happens to the first line (after the title) for some reason. The others get their line breaks rendered even tho they're also full length

01:04:15 - P#28 | font="JetBrainsMono Nerd Font" | trim=false | bash="true" | terminal=false
---
Unternehmenskreis ❘ Basisprojekt  (Entwicklung / Fortbildung)  "Time Tracker" \n10:30 - 11:34                                                    󰑐  Neu Laden| font="JetBrainsMono Nerd Font" | trim=false | bash="curl" | terminal=false | refresh=true | param1="http://localhost:9999/refresh"
---
Überzeit:          Arbeitszeit insgesamt:\n󰔟  Heute: -05:52h │██████████▍                            │       2/8 Stunden\n󰔟  KW 06: -03:51h │███████████████████▋                   │     20/40 Stunden\n󰔟  Total: -06:28h │██████▉                                │  370/2096 Stunden| font="JetBrainsMono Nerd Font" | trim=false | bash="true" | terminal=false
󰩈  Feierabend: 16:22 oder, wegen Unterzeit: 16:58| font="JetBrainsMono Nerd Font" | trim=false | bash="true" | terminal=false

The one linebreak that isn't rendered is at 3:79 The working ones are at 5:42, 5:121 and 5:200,

moritztim commented 8 months ago
Bildschirmfoto 2024-02-07 um 13 04 59

Weirdly, the second menu entry shows a tooltip when hovering but the first one doesn't