usage #
Vidya desktop app that shows live disk and network I/O as circular gauges.
Dark charcoal shell, accent-blue arcs, auto-scaling ceilings, and a per-device breakdown — samples /proc/diskstats and /proc/net/dev about twice a second.
Run #
From this checkout (with sibling ../vidya):
nix run # apps.default → cargo build + gtk-launch .desktop (icon)
nix run .#desktop # same
nix run .#usage # cargo build + run binary only (no .desktop)
nix run .#build # cargo build --release only
nix run .#package # pure store binary
nix run .#package-desktop # pure package via its .desktop
apps.default / apps.desktop cargo-build, install usage.desktop + hicolor icons into $XDG_DATA_HOME (~/.local/share by default — required on Wayland/GNOME; a private share dir is invisible to the shell), refresh icon/desktop caches, then gtk-launch usage. The binary also embeds the PNG via vidya::with_app_icon_id (used on X11; Wayland window icons come from the FreeDesktop entry). Incremental builds go into ./target/.
Optional interactive shell:
nix develop
cargo run --release
Packaged install (pure Nix derivation — may use remote builders):
nix build .#usage
./result/bin/usage
# also: result/share/applications/usage.desktop
# result/share/icons/hicolor/.../apps/usage.{svg,png}
What you see #
| Gauge | Source |
|---|---|
| Disk Read | Aggregate sector reads on whole disks (sda, nvme0n1, …) |
| Disk Write | Aggregate sector writes |
| Net Down | RX bytes on real interfaces (skips lo, docker, veth, …) |
| Net Up | TX bytes |
Each gauge fills against an auto-scaling peak (nice 1/2/5×10ⁿ ceiling) so idle and busy machines both stay readable. Heat colors shift accent → warning → destructive as the arc fills.
Below the gauges: cards listing individual disks and network interfaces with mini read/write bars, plus a process table (name, path, disk write rate, write syscall frequency) from /proc/[pid]/{io,exe}.
Requirements #
- Linux (
/proc) - Wayland or X11 (egui / eframe)
Nix #
| Output | Role |
|---|---|
apps.default / apps.desktop |
Devshell: cargo build + gtk-launch .desktop (icon) |
apps.usage |
Devshell: cargo build + run binary only |
apps.build |
Devshell: cargo build --release only |
apps.package |
Pure store binary |
apps.package-desktop |
Pure package via its .desktop |
packages.default / packages.usage |
Binary + .desktop + hicolor icons |
packages.desktop |
Wrapper that launches the packaged .desktop |
devShells.default |
rustc + cargo + egui runtime libs |
assets/usage.svg |
App icon source |
Apps need a live checkout next to ../vidya. The packaged packages.usage stages flake input vidya for pure builds.
License #
MIT