devanlooches / rocketfetch

A WIP command line system information tool written with multithreading in rust for performance with toml file configuration.
MIT License
10 stars 1 forks source link

Host text too long for single line in some terminal sizes #3

Closed Kara-Zor-El closed 2 years ago

Kara-Zor-El commented 2 years ago

Screenshot_20211231_150530 would be great if there were a way to have text wrap to the next line after the ascii art PS. love this project and has been a huge help to me when looking for different ways of doing stuff for my own rust neofetch clone

devanlooches commented 2 years ago

Hello! Thank you for the feedback! How many characters do you propose to be the maximum before a line wrap be done?

Kara-Zor-El commented 2 years ago

I would say I would say the length of the string / 2 would probably be the best bet

devanlooches commented 2 years ago

Hmm. That doesn't actually sound so great because at least on my computer the string is very short.

devanlooches commented 2 years ago

I think we should go with like a maximum number of characters

devanlooches commented 2 years ago

I just added line wrapping depending on the terminal size. Can you let me know if it works for you?

Kara-Zor-El commented 2 years ago

Hi, that works well now however there is a blank after the terminal module image

devanlooches commented 2 years ago

I just pushed a new commit that should fix it. I think it was because i did not add trims to the output.

Kara-Zor-El commented 2 years ago

hi, sorry for getting back so late to you, it is still doing the exact same thing. maybe specifically try doing [variable].replace("\n", " "); to make sure it isnt doing \n during it

devanlooches commented 2 years ago

Sorry it took me so long. I just pushed another update (on crates.io). Can you let me know if it fixed the problem?

devanlooches commented 2 years ago

I'm going to close this issue for now because I think I fixed it. You can reopen it if you think I'm wrong.