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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How about higher resolution size bar ? #254

Closed
yurenchen000 opened this issue Jun 5, 2023 · 4 comments · Fixed by #255
Closed

How about higher resolution size bar ? #254

yurenchen000 opened this issue Jun 5, 2023 · 4 comments · Fixed by #255
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@yurenchen000
Copy link
Contributor

yurenchen000 commented Jun 5, 2023

I noticed that there is already some discussion about size bar:
#82
#121

I think here is a discussion about another dimension of size bar:
the indicator resolution.

0. Current display effect

gdu_bar

You can see 49MB and 24KB has same bar width.
// I replaced # with in the screenshot.

Maybe display effect could be better

1. The magic characters

Code Character Width
U+2588 8/8
U+2589 8/7
U+258A 8/6
U+258B 8/5
U+258C 8/4
U+258D 8/3
U+258E 8/2
U+258F 8/1

ref:
https://mike42.me/blog/2018-06-make-better-cli-progress-bars-with-unicode-block-characters/amp
https://en.wikipedia.org/wiki/Block_Elements

try:


███ -- 24 width
██▉
██▊
██▋
██▌
██▍
██▎
██▏ 
██  -- 16
█▉
█▊
█▋
█▌
█▍
█▎
█▏  
█   -- 8 
▉
▊
▋
▌
▍
▎
▏   -- 1

This makes it possible to obtain higher resolution bars.

How about it?

shortcoming: maybe need mono width font-family in user terminal application.

@dundee dundee self-assigned this Jun 5, 2023
@dundee
Copy link
Owner

dundee commented Jun 5, 2023

Very nice idea indeed! Would you like to implement it or should I do it?

@dundee dundee added enhancement New feature or request good first issue Good for newcomers labels Jun 5, 2023
@dundee
Copy link
Owner

dundee commented Jun 5, 2023

Sorry, I couldn't resist 😇

@yurenchen000
Copy link
Contributor Author

quick and clean
you genius,
that's awesome 😆

I run the new code as fast as I could,
it works perfectly 👍

@dundee
Copy link
Owner

dundee commented Jun 6, 2023

I will release new version in the evening. Thanks for great contribution!

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

Successfully merging a pull request may close this issue.

2 participants