Skip to content

opinionmachine/showdisk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

showdisk

Disk usage pie charts as sixel graphics in the terminal. By default it discovers internal volumes (Linux: block-backed mounts from lsblk; macOS: internal APFS volumes), measures top-level usage on each filesystem, and prints one chart per volume. You can also chart a single directory to see how space is split among its immediate children (same filesystem only).

Requirements

  • Rust toolchain (see rustup) — MSRV 1.74 (see Cargo.toml).
  • A terminal that can display sixel images (many modern terminals; iTerm2, WezTerm, mlterm, etc.). If you only see escape codes or a blank area, try another terminal or enable sixel support in your emulator settings.

Install

From a clone (release binary)

git clone <URL-of-this-repo>
cd showdisk
./install.sh

install.sh runs cargo build --release and prints the path to the binary (target/release/showdisk). Optionally it can append that directory to your PATH in ~/.zshrc.

You can also build by hand:

cargo build --release
# Binary: target/release/showdisk

Add target/release to your PATH, or run the binary by full path.

Run

showdisk

Charts all discovered internal volumes (one sixel pie + legend per volume).

Options

Flag Meaning
--mount PATH Chart only this mount point (skips automatic discovery).
--dir PATH Chart this directory only: immediate files and subfolders, on the same filesystem as PATH (does not cross mount points). Useful for finding large children under a known folder. Pie is relative to that folder’s total size (no “free space” slice).
-s, --size N Pixel width/height of the chart (default 360).

Examples:

# Only the root of your data volume
showdisk --mount /Volumes/Data

# What’s using space inside a project or backup tree
showdisk --dir ~/Backups

# Smaller chart
showdisk -s 240

How it works (brief)

Scanning uses an in-process, parallel directory walk (same-filesystem semantics similar to du -x), capped at the number of CPUs reported by the OS so it stays reasonable on VMs.

License

See LICENSE in this repository.

About

Show pie chart of disk usage

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors