Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not look well on small terminal #980

Closed
1 task done
pickfire opened this issue Mar 12, 2023 · 10 comments
Closed
1 task done

Does not look well on small terminal #980

pickfire opened this issue Mar 12, 2023 · 10 comments
Assignees
Labels
enhancement New feature or request

Comments

@pickfire
Copy link

Duplicates

  • I have searched the existing issues

Current behavior 馃槸

When running onefetch on a small terminal 80x24, it does not seemed to work well.

Expected behavior 馃

The image and the stuff should not overflow. Maybe less people use 80x24 nowadays but it is probably not that rare given that quite a few terminals defaults to this size when starting.

Steps to reproduce 馃暪

  1. onefetch

Additional context/Screenshots 馃敠

Screenshot_20230312_195054

Possible Solution 馃挕

Reduce the ascii image size.

@spenserblack
Copy link
Collaborator

Just checked what neofetch does, and it looks like it simply cuts off text past the right boundary of the terminal.
\e[?7l seems to be the relevant escape sequence.

@o2sh
Copy link
Owner

o2sh commented Mar 12, 2023

We've already covered this issue in the past #327 and what came out of it is the following CLI flag:

  --show-logo <WHEN>
      Specify when to show the logo

      If set to auto: the logo will be hidden if the terminal's width < 95

      [default: always]
      [possible values: auto, never, always]

But I agree with @spenserblack, it would be better to programmatically disable the line wrap with print!("\x1B[?7l"). Unfortunately, last time I tried I failed: #327 (comment)

@spenserblack
Copy link
Collaborator

@o2sh Thanks for the reminder! Should we consider changing the default value of the flag from always to auto? Technically a breaking change, but it should make it less likely that this issue gets raised again.

@pickfire
Copy link
Author

Wouldn't it be good to as well reduce the logo size?

@spenserblack
Copy link
Collaborator

spenserblack commented Mar 13, 2023

Wouldn't it be good to as well reduce the logo size?

Like detecting terminal width and shrinking the ASCII art to fit?

Resizing is certainly an interesting idea, but, giving that ASCII art doesn't have many "pixels", I fear that resized ASCII art could quickly become unreadable and/or diverge from the artist's intent. For example, a resizing algorithm would very likely garble the NASA from Fortran's ASCII art.

@o2sh
Copy link
Owner

o2sh commented Mar 13, 2023

Wouldn't it be good to as well reduce the logo size?

One could create a lightweight version of 'onefetch' that emulates the style of pfetch by using smaller ASCII logos and displaying only a selection of info lines.

Should we consider changing the default value of the flag from always to auto?

If we can't find a way to disable the line wrap properly, we may want to try that.

@o2sh o2sh added the enhancement New feature or request label Mar 13, 2023
@pickfire
Copy link
Author

Like detecting terminal width and shrinking the ASCII art to fit? Nope, but just find a smaller logo?

@o2sh o2sh mentioned this issue Mar 15, 2023
@o2sh o2sh self-assigned this Mar 18, 2023
@o2sh
Copy link
Owner

o2sh commented Mar 18, 2023

Before:
Screenshot 2023-03-18 at 15 04 32
Now:
Screenshot 2023-03-18 at 15 06 07
@pickfire with #983, onefetch has been updated to automatically disable text wrapping on the terminal before printing its output, and then re-enables it immediately afterwards. Although this may not be the exact solution you were expecting, it ensures that the output remains readable even when the terminal window is small, without changing the output's size.

@pickfire
Copy link
Author

pickfire commented Mar 20, 2023

Screenshot_20230320_204230

Yeah, it looks better now. I guess I can close this issue.

I realized the logo only works well on dark theme, since the eyes is invisible, but I guess it's fine for now.

@spenserblack
Copy link
Collaborator

I realized the logo only works well on dark theme

onefetch --true-color never for better light terminal compatibility.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants