Toqozz / wired-notify

Lightweight notification daemon with highly customizable layout blocks, written in Rust.
MIT License
581 stars 27 forks source link

Option for dynamic resize of a text box #106

Closed elyashivhazan closed 1 year ago

elyashivhazan commented 1 year ago

Hi, I have some programs/scripts that send just a bit longer text then the defined box in the config and I did not see a way to fix that. When it happens I see the first and the last word only and it will also be a alternative to scrolling text box.

Toqozz commented 1 year ago

Hey, so TextBlock are actually already dynamically sized. The variable you're looking for is probably dimensions: (width: (min: 50, max: 150), height: (min: 0, max: 0)),. You can set min/max to 0 to have a TextBlock that is completely dynamic.

Check out the wiki page for more info on it.

If this doesn't answer your question or I've misunderstood, please send a screenshot or something so I can get a better idea of what you mean.

elyashivhazan commented 1 year ago

Its working 100% fine. I changed from scrolling box to normal one and set both the dimensions and ellipsize the same.

BTW ellipsize is not updated on the doc None should be NoEllipsize.

Thanks for pointing me to that.