Commit Graph
57 Commits
Author SHA1 Message Date
Douglas Moura 9dc507edcf README: yay, not paru (it is what Omarchy ships) 2026-09-25 18:02:23 -03:00
Douglas Moura 2d2298ee34 README: document the AUR packages 2026-09-25 17:56:39 -03:00
Tobias Lütke 747cb77766 Merge pull request #24 from tobi/release-0.10.1
release 0.10.1
v0.10.1
2026-09-25 14:30:05 -06:00
Tobi LütkeandClaude Opus 5.5 91d0ada4ce release 0.10.1: gpui-omarchy 0.1.3
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 20:13:57 +00:00
Tobias Lütke cd1a9d8afb Merge pull request #22 from tobi/omarchy-0.1.3
gpui-omarchy 0.1.3, and the quarantine fix for macOS downloads
2026-09-25 14:04:10 -06:00
Tobi LütkeandClaude Opus 5.5 ba0258db8f gpui-omarchy 0.1.3, and the quarantine fix for macOS downloads
gpui-omarchy 0.1.3 needs gpui-kit 0.6.6, which brings gpui-pre 0.3.6.

The README gives the xattr command that clears the quarantine mark an
unsigned download carries, so Gatekeeper stops calling the app damaged.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 19:48:33 +00:00
Tobias Lütke e4ed4a8eb8 Merge pull request #21 from tobi/release
Release 0.10.0: builds for Linux, macOS and Windows on x86_64 and aarch64
v0.10.0
2026-09-25 11:12:46 -06:00
Tobi LütkeandClaude Opus 5.5 8b662004a4 release 0.10.0, built for every platform on Intel and ARM
Linux, macOS and Windows, each x86_64 and aarch64, on native runners.
The release is drafted first and published once every build is in, so
a failed build never leaves a public release missing downloads. CI
tests the three architectures it did not run on before.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 16:50:57 +00:00
Tobias Lütke 033113da20 Merge pull request #20 from tobi/delete-list
Review: save the delete list, or copy it as a prompt for an agent
2026-09-25 10:48:53 -06:00
Tobias Lütke 97127774d6 Merge pull request #19 from tobi/parity
Platform parity: shortcuts, theme, Windows caches, hidden and mount guards
2026-09-25 10:48:32 -06:00
Tobi LütkeandClaude Opus 5.5 1682463869 review: save the list, or copy it as a prompt for a coding agent
Two ways to hand the marked list on instead of acting on it. `s` saves
the paths the plan would act on, one per line. `a` copies instructions
for an agent: free the space by removing exactly these, checking each
first (unpushed git work, a tool's own clean command), trash over delete,
and report back. A name with a control character is left out of the list
and escaped in the prompt, so a newline cannot pass for another path or
close the list and carry on as instructions.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 16:24:03 +00:00
Tobi LütkeandClaude Opus 5.5 670407f37e removal: Homebrew on Linux, Guix and the extra lib dirs are system trees; so are Windows' page and hibernation files
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 16:20:24 +00:00
Tobi LütkeandClaude Opus 5.5 e1851c624b scan: the hidden attribute hides an entry on Windows, as Explorer does
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 16:19:45 +00:00
Tobi LütkeandClaude Opus 5.5 41328cdc67 app: follow the system's light or dark setting on Windows, GNOME and KDE
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 16:18:54 +00:00
Tobi LütkeandClaude Opus 5.5 a64a58060d removal: read Windows' volume list, so a volume mounted inside a target is refused
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 16:17:59 +00:00
Tobi LütkeandClaude Opus 5.5 2ed6720638 classify: Windows temp, crash dumps, caches, Recycle Bin and sync folders
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 16:17:59 +00:00
Tobi LütkeandClaude Opus 5.5 a95dce783b git: no console window per probe on Windows
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 16:17:59 +00:00
Tobi LütkeandClaude Opus 5.5 13fd9ee158 app: Open Folder, rescan, quit and reveal shortcuts on Linux and Windows
They were bound on macOS only, so Open Folder could not be reached at all
elsewhere. ctrl-o, ctrl-r and F5, ctrl-q, ctrl-w and ctrl-shift-r; the
help names ctrl-o and File Explorer on Windows.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 16:17:59 +00:00
5cb0284345 README: say where to get Rust on every platform
From tobi/disktree#2.

Co-authored-by: Lucas Arruda <88818+LucasArruda@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 16:10:02 +00:00
Tobias Lütke 7d235318b1 Merge pull request #17 from tobi/cross-platform
macOS and Windows support, merged PRs, and a security pass
2026-09-25 09:58:28 -06:00
Tobi LütkeandClaude Opus 5.5 46711fc816 removal: a target under the Data volume's root is inside it
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 15:39:33 +00:00
Tobi LütkeandClaude Opus 5.5 b9ba523a92 removal: follow links above the scanned root, only refuse them below
Walking from / with O_NOFOLLOW refused every path under /var and /tmp
on macOS, which are links. Open the root as named and refuse links only
between it and the target, as the plan does. Also two tests that assumed
Unix now run or skip on Windows.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 15:21:12 +00:00
Tobi LütkeandClaude Opus 5.5 2ee640a448 ci: read-only token for CI, and the release tag through the environment
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 14:27:16 +00:00
Tobi LütkeandClaude Opus 5.5 d37870cdea removal: refuse names Win32 misreads, links on the way down, and home by its real path
- Windows strips trailing dots and spaces and maps NUL/COM1 to devices,
  so a scanned `C:\Users.` would have removed `C:\Users`. Refused.
- The trash (everywhere) and removal on Windows follow a link on the way
  to a target out of the scanned root. The real parent is compared with
  the real root, in the plan and again on the worker.
- The home directory is also matched by its canonical path, so a link
  such as /home -> /data/home no longer hides it from 'contains home'.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 14:27:05 +00:00
Tobi LütkeandClaude Opus 5.5 f2a0056960 git: a checkout's config can no longer run programs through the status probe
`git stash list` is `git log`: a repository that sets log.showSignature
and gpg.program ran that program when the Explore screen probed it.
Count stashes from the reflog, and turn off every program-valued key and
network path the probe could reach.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 14:24:31 +00:00
Tobi LütkeandClaude Opus 5.5 41331f363f macOS: ⌘[ and ⌘] for back and forward, and a Go menu
What Finder and Safari use; alt-arrows from #12 still work. Only on the
explore screen, where the history buttons are.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 14:16:43 +00:00
Tobi LütkeandClaude Opus 5.5 1220150762 removal: close the path race, and judge mounts again before removing
Permanent deletion opened its target by full path, following any
symlink on the way down. A directory swapped for a link after the scan
(a shared /tmp, say) redirected the removal: `/tmp/d/x` marked, `d`
made a link to `~`, and `~/x` went. The way down is now opened one
component at a time with O_NOFOLLOW (O_PATH on Linux), and the target
removed with unlinkat relative to its parent. The scanned root is
canonical, so a marked path never legitimately has a link on it.

The plan is judged against a mount table read on a background thread,
empty until the first read lands and up to two seconds old after. The
removal worker now reads it fresh and checks each target for a mount
point on it or inside it before touching anything. Permanent deletion
stopped at a mount boundary already; the trash did not.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 14:14:22 +00:00
Tobi LütkeandClaude Opus 5.5 f39f96e62f Merge pr/14 (Windows) onto the macOS port
One set of removal guards for all three platforms: guard_key folds
macOS firmlinks and case, and now Windows case and verbatim prefixes,
so within/same from #14 become key comparisons. System trees are one
keyed list per platform.

Fixed while merging:
- plan() found home through $HOME, which Windows does not set, so every
  home guard was off there; std::env::home_dir() instead.
- Scan: #14's Listed/Facts shape with #13's never-scanned paths,
  dataless iCloud folders and track-only-shared-inodes; OneDrive
  cloud-only folders are skipped the same way on Windows.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 14:14:22 +00:00
Tobi Lütke 21157ca878 README: restore the history and window-class notes 2026-09-25 14:01:06 +00:00
Tobi Lütke df03ca8b6e Merge remote-tracking branch 'pr/13' into cross-platform
# Conflicts:
#	README.md
#	crates/disktree-app/src/git.rs
#	crates/disktree-core/src/removal.rs
2026-09-25 14:00:43 +00:00
Tobi Lütke 9df79891ed Merge remote-tracking branch 'pr/12' into cross-platform 2026-09-25 14:00:26 +00:00
Tobi Lütke 83c7bcc47a Merge remote-tracking branch 'pr/10' into cross-platform 2026-09-25 14:00:26 +00:00
Oleg Shevchuk 82d73fbcf8 CI and releases on Windows; README
- CI runs the lint gate and the tests on windows-2025 beside Ubuntu, on
  the same pinned toolchain.
- A tag also publishes disktree-<version>-x86_64-windows.zip, built after
  the Linux job, which checks the tag and creates the release. The C
  runtime is linked in, so it runs without the Visual C++
  redistributable.
- README says how to install on Windows and what differs there; AGENTS
  points at windows.rs and says how to run the gate without make.
2026-09-25 15:09:27 +05:00
Oleg Shevchuk 5aa98e3818 app: run on Windows
- The home directory comes from std::env::home_dir, which reads
  USERPROFILE on Windows and HOME elsewhere.
- The root is canonicalized through dunce, so Windows paths read
  C:\Users\... rather than \?\C:\..., the form nothing else is written
  in and which would never match the home directory.
- A windowed program on Windows: no console window from Explorer or the
  Start menu. It attaches to the console of a terminal it was started
  from, as Alacritty does, so --help and errors still show there.
- Paths after ~ and the trail between crumbs use the platform's
  separator: ~\AppData\Local, C:\ Users \ tobi.
2026-09-25 15:09:18 +05:00
Oleg Shevchuk cac3d76c3f core: refuse a directory that holds the home directory
Removing a directory takes what is inside it. In a whole-disk scan on
Windows, C:\Users is an ordinary directory that passes every other
guard, and so is /home on a Linux install without a separate volume:
marking either would remove the home directory the guards are there to
protect.
2026-09-25 15:09:09 +05:00
Oleg Shevchuk f3741c1a51 core: list, measure and remove on Windows
disktree-core builds and measures on Windows. `windows.rs` holds what the
standard library does not give: a directory listing through
GetFileInformationByHandleEx with FileIdExtdDirectoryInfo, which carries
each entry's allocation and file id for a whole buffer of entries.
Opening every file for those two numbers made a walk of a home directory
of 1.3 million files seven times slower (65 s against 9 s); the listing
costs what FindNextFileW costs. Where a file system does not implement
it (a Samba share answers ERROR_INVALID_LEVEL), the walk falls back to
std's listing, with lengths.

- Disk usage is the NTFS allocation: whole clusters, less for a
  compressed or sparse file, nothing for data kept in the file record.
- Hardlinks count once on NTFS, keyed by volume serial and file id. FAT
  ids are documented as not unique and ReFS ids need all 128 bits, so
  neither is used; there a hardlink counts once per name.
- Junctions and mounted folders are links, as std already treats them,
  so the walk stays on one volume unless links are followed. The whole
  disk is the drive the profile is on.
- Removal refuses Windows, Program Files, ProgramData and what Windows
  keeps at the top of its drive, comparing names without case. A mounted
  folder is a mount point. A link to a directory is removed with
  RemoveDirectoryW, which leaves its target alone.
- Move to trash is the Recycle Bin, through the trash crate, which asks
  the shell to warn before destroying anything it cannot recycle.

All unsafe code is in windows.rs, each block with the reason it is sound.
On Unix the walk reads the same metadata through the same calls.
2026-09-25 15:08:55 +05:00
Sebastian Sieber cbdfe1c332 macOS support: native Trash, APFS-aware scans, a signed app bundle
disktree built and drew on macOS already, through GPUI's Metal backend,
but the Linux plumbing underneath did not carry over. This makes it work
well there, without unsafe code, and tightens removal safety for every
platform on the way.

Trash and removal
- On macOS always the system Trash, through NSFileManager (the trash
  crate): the same move as Finder's, into the item's own disk's Trash.
  gio/trash-put/XDG would put files in ~/.local/share/Trash, which Finder
  never shows.
- Refuse a directory holding the home directory (/Users is on the same
  volume as / on macOS) or a system tree (/opt holds /opt/homebrew); add
  /System, /Library, /private, /opt/homebrew, /cores, /Network.
- Refuse a directory with a mount inside it; on macOS the mount list comes
  from /sbin/mount, read on a background thread.
- Permanent deletion walks the tree itself and stops at a mount boundary,
  like rm -rf --one-file-system (the walker is from #10).
- Guards see through /System/Volumes/Data spellings and, on macOS, case.

Scanning
- Skip /System/Volumes/Data when scanning /: it is /Users, /Applications
  and the rest again under firmlinks, so / was counted twice.
- Whole disk (g, --disk) works: the disk root and device come from statfs.
- Never list cloud-only (dataless) iCloud/File Provider folders, which
  would download them.
- Keep a file's identity only when it has more than one name.

App
- Explain unreadable items when Full Disk Access is missing, with a button
  to the privacy settings.
- A menu bar: Open Folder… (⌘O), Show in Finder (o, ⌘⇧R), Rescan (⌘R),
  Hide, Quit; closing the window quits; other ⌘ chords are not read as
  plain letters; help shows ⌘.
- Follow the system light/dark appearance when no Omarchy theme exists.
- Worth a look knows Xcode DerivedData, DeviceSupport and ~/Library/Logs.
- git: skipped without the developer tools (its stub opens a dialog), and
  never runs a checkout's programs: fsmonitor, hooks and pager off, and no
  status for a checkout that defines its own filter drivers.

Packaging
- cargo xtask bundle builds disktree.app and a zip: Info.plist (bundle id
  io.github.tobi.disktree, macOS 11+), an icon drawn from an SVG on the
  macOS grid, ad-hoc or Developer ID signing, and --notarize.
- make install on macOS puts the app in ~/Applications and links
  ~/.local/bin/disktree to it.
- CI lints, tests and bundles on macOS; the release adds an arm64 macOS
  zip, signed and notarized when the repository has the Apple secrets.
2026-09-25 17:29:55 +08:00
Mathias BogaertandClaude Opus 5.5 db843bb4f8 Back and forward through the directories visited
`<` and `>` sit to the left of the Size / Files / Age switch and retrace
where you have been, as in a browser: going somewhere new drops what was
ahead. Alt-arrows and the mouse's side buttons do the same. Each is
disabled when there is nowhere to go.

Hovering one shows the card the mosaic shows for a tile, for the
directory it leads to, hung below the button rather than over it.

History is kept as absolute paths, not crumbs, so a re-scan or a
widening cannot point it at other directories; entries a new tree no
longer holds are dropped when it lands. A step animates like the move
it retraces: growing into a directory below, shrinking out to one above.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 08:18:29 +00:00
Mark SilversteinandClaude Opus 5.5 46f0c8fc2f fix: keep a checkout's config from running programs during git status
A repository's .git/config can set core.fsmonitor to a program, which git
runs on every status; safe.directory does not cover repos the user owns.
Selecting a directory now overrides fsmonitor, hooksPath and pager on the
command line, which outranks repository config.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 13:57:48 +08:00
Mark SilversteinandClaude Opus 5.5 fdb2e42e5e fix: never delete into a filesystem mounted inside a target
remove_dir_all crosses mount boundaries, so permanently deleting a marked
directory emptied anything mounted below it (sshfs, NFS, a USB disk, a
bind mount) before failing with EBUSY on the mount point. A one-filesystem
scan never shows that content, so it was data the user never saw.

The plan now refuses a target with a mount point beneath it, and the
removal walks the tree itself with openat(O_NOFOLLOW), stopping at a
directory on another device or mount (statx mount ID, which also sees
same-filesystem bind mounts).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 13:57:48 +08:00
Mark Imbriaco afc87fc647 Set the window class to disktree
The desktop entry and the Hyprland rule already name this class. The
window never set a Wayland app id, so the class was empty and the rule
did not match.
2026-09-24 20:43:52 -04:00
Tobi Lutke bf6cbbfbee 0.9.1 v0.9.1 2026-09-24 17:27:34 -06:00
Tobi Lutke 010f8ca972 README: marking covers everything inside 2026-09-24 17:19:51 -06:00
Tobi Lutke 15aed9135f Marking a directory marks everything inside it
Removing a directory takes its contents, so everything inside a marked
directory is drawn marked: the same danger fill and label, with the ring
only on the outermost so the mosaic does not become a grid of borders.

A mark absorbs the marks already inside it, and a path inside a marked
directory cannot be marked on its own: Space says which mark it goes
with, and the panel's button becomes "Unmark <directory>".
2026-09-24 17:19:36 -06:00
Tobi Lutke 59096e4744 A better screenshot; actions/checkout v5 (Node 24) 2026-09-24 17:29:52 -05:00
Tobi Lutke 92f4031216 0.9.0: screenshot, CI, and release builds
- The README opens with a screenshot, and says how to install a release.
- CI lints and tests every push and pull request on a pinned toolchain.
- Pushing a v* tag builds a release on the oldest supported Ubuntu (for
  glibc reach), checks the tag against Cargo.toml, runs the tests, and
  publishes disktree-<version>-x86_64-linux.tar.gz with a checksum. The
  archive carries install.sh, which installs the binary, desktop entry
  and icon into ~/.local without a Rust toolchain.
- The desktop entry passes a path (%f), not a URI, to disktree.
v0.9.0
2026-09-24 17:13:38 -05:00
Tobi Lutke e2c397b4b0 The trail moves to the top bar, with sibling menus
Each crumb in the tree has a ▾ listing its siblings, largest first, with a
share bar in each one's colour and its size: a jump sideways without
going up. The current crumb opens it on a click too. Arrows, Home, End
and Enter work inside it; Escape or a click outside closes it. A deep
trail folds its middle into an ellipsis.

The scan totals move under it, as one quiet line beside the legend.
2026-09-24 16:55:14 -05:00
Tobi Lutke c11c86f50f app: a trail from /, and typeahead filtering
- The trail always starts at /. Directories above the scanned root are
  dimmer; clicking one widens the scan to there, reusing the tree already
  measured, with the current view kept until the wider tree lands. g goes
  to the whole disk. The Home | Whole disk switch is gone.
- / filters: as you type, only matches keep their colour (the directories
  holding them step back less); Enter lays out only the matches at their
  size, with the largest selected; Escape clears. The search runs off the
  UI thread, newest keystroke wins, and an early Enter applies on arrival.
2026-09-24 16:51:31 -05:00
Tobi Lutke 23b9e5d21b core: memoized widening and name filtering
- scan: spawn_with takes a Known subtree and reuses it where the walk
  reaches it, so widening from ~ to / reads only what is outside ~.
- filter: which nodes match a name, ignoring ASCII case without
  allocating. Matches are kept whole; their ancestors are kept sized by
  what matched beneath them.
- treemap: layout_filtered lays out only what a filter keeps.
2026-09-24 16:51:31 -05:00
Tobi Lutke f67fd56174 Whole-disk launcher action; README for the redesign 2026-09-24 16:42:08 -05:00