A treemap for finding and removing what fills your disk, for Omarchy. Rust + GPUI.
Rust
removal: a target under the Data volume's root is inside it
Tobi Lütke46711fc8161e
diff --git a/crates/disktree-core/src/removal.rs b/crates/disktree-core/src/removal.rsindex e6e4d8f..3874564 100644--- a/crates/disktree-core/src/removal.rs+++ b/crates/disktree-core/src/removal.rs@@ -390,7 +390,9 @@ fn refuse(if home_key.is_some_and(|home| home.starts_with(&key)) {return Some("it contains the home directory".into());}- if !key.starts_with(&root_key) {+ // By spelling too: the Data volume's root keeps its name as a key, while+ // everything under it is keyed as under `/`.+ if !key.starts_with(&root_key) && !path.starts_with(root) {return Some("outside the scanned root".into());}if let Some(system) = system_tree(&key, home_key) {