mako icon indicating copy to clipboard operation
mako copied to clipboard

mako swallows output

Open cherti opened this issue 4 years ago • 1 comments

When using

notify-send "foo" 'This is a text.
It is intended to test the line numbers that can be displayed
This is line 3.
This is line 4.
This is line 5.
This is line 6.'

mako will break the second line into two (so far so good) and then just swallow everything from line 3 onwards without further indication. This is particularly problematic if the content of the notification changes if something is left out.

mako notification with lines cropped

This can be reconfigured by setting the height parameter, but to do that, you'd have to know about this behavior, which is only evident once you suspect it upfront and look it up in mako(5). If a user doesn't, they might get a notification popup that is incomplete without their knowledge. As Notifications are shrunk anyways to fit the content, the default height parameter could be raised without harm. Alternatively an indicator could be implemented, indicating when output is swallowed. Both approaches would alleviate the issue.

cherti avatar Oct 01 '21 11:10 cherti

Pango is supposed to be ellipsizing the text for us, but it seems like it doesn't do it when a newline is present on the end of the line where it would be ellipsized and the line fits within the width. I peeked at dunst to see if they have a workaround for this but it doesn't appear to be the case. I'm not sure if we can easily detect this situation to fix it ourselves.

Regarding the default height, I wonder if it would make sense to support height=0 to mean unlimited and default to not any information?

vilhalmer avatar Dec 04 '21 18:12 vilhalmer