Skip to content

How about higher resolution size bar ? #254

@yurenchen000

Description

@yurenchen000

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.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions