Skip to content

Add a graphical representation with the -g option #46

@Angelmmiguel

Description

@Angelmmiguel

The --graph or -g option will enable a graph on the right of the different files. It provides a visual hint about the percentage of the file size in the total amount.

To represent this information in the terminal, I will use the full block character: . This allow me to show a full block to represent the different percentages:

$ fu --top 2 ./
DISK    BYTES   PATH
258M    238M    target  ████████████████████
492K    71K     .git    █

The total will be represented by 20 blocks, so we can properly calculate the number of blocks to show. These blocks will use the proper color too.

In addition to that, this can be enabled by default using the FU_GRAPH_MODE environment variable.

Metadata

Metadata

Assignees

Labels

featureNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions