mako icon indicating copy to clipboard operation
mako copied to clipboard

Let us set max width. *feature request*

Open freed00m opened this issue 5 years ago • 12 comments

Hi,

I use both long and short notification in terms of line lenght. I can set width but that's looking ugly for short notification.

See screenshot of what I mean, or maybe honoring the line break and calculate the lenght of the longest line?

2018-10-01-232102_grim 2018-10-01-232201_grim

freed00m avatar Oct 01 '18 21:10 freed00m

Hmm. A max-width option would also imply that we'd need min-width, and have width override both of them if it is specified, which is adding quite a bit of complexity to the configuration. I don't think we want width to behave like height in this case, where it is implicitly a maximum. Having both the width and the height flexible also creates complications. How do you decide which direction to expand first?

Once #46 is fixed, you'll be able to specify width by matching on the application sending the notification or similar, would this be sufficient?

vilhalmer avatar Oct 02 '18 02:10 vilhalmer

Ping since #46 is closed.

vilhalmer avatar Feb 01 '19 04:02 vilhalmer

Another idea might be to allow notifications to shrink, instead of having a fixed width. This way you could then set the width to eg. 500 or more, and still have smaller notifications displayed nicely without much whitespace.

Babadabupi avatar Mar 03 '19 09:03 Babadabupi

@vilhalmer OK, so what about it not being a px dimension but a character count length? Then you would expand till, you reach the defined int parameter and then you would force a breakline.

max-line-chars ?

@Gigg1ty I don't get it, you just described the behavior that would be achieved by working max-width :D

freed00m avatar Mar 03 '19 09:03 freed00m

max-line-chars

Not a fan of this. Doesn't play well with non-monospace fonts, duplicates functionality.

emersion avatar Mar 03 '19 09:03 emersion

@freed00m Um, i guess you are right 😅 But my thinking was that a min-width would not really be required this way, as notifications could be allowed to be as short as a single character.

Babadabupi avatar Mar 03 '19 09:03 Babadabupi

@emersion that's true. Ignoring all the arabic ligature weirdness where two characters are often shorter than single one. Is there a way to get font's character px length? I think dunst just uses some pango font width as reference and hopes every other font fits more or less.

freed00m avatar Mar 03 '19 10:03 freed00m

Can we introduce a shrink option in mako like @Gigg1ty suggested? Let the width and height implementation remain as it is.

ghost avatar Jul 20 '20 23:07 ghost

Ideal would be something like dunst has, width = (20,300) where it is either (min,max) pair like this or single digit if you want fixed width, but me personally would be satisfied with just shrinking

nagy135 avatar Nov 08 '21 19:11 nagy135

Yes, I too would be happy to have shrinking for the width parameter and the normal setting of width. So 300 and then anything lower gets shrunk like it would with height.

nnuel avatar Jan 27 '22 13:01 nnuel

Will this be implemented someday?

apprehensions avatar Feb 27 '24 07:02 apprehensions

I'm also looking forward to the day this gets implemented.

sudoharun avatar Mar 17 '24 15:03 sudoharun