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>
`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>
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>
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>
- 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.
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.
`<` 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>
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>
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.
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>".
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.
- 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.
- Tiles are coloured by kind at one muted level, lighter with depth, and
hatched where the space can be had back. Age mode colours by last write.
Top-level directories carry a strip of their colour.
- One highlight, the theme's amber: selection, the main action, what the
marks free. Outlines paint after every fill and snap to device pixels.
- A resizable side panel replaces the bottom bars: the selection with its
size set large, share, files, last write and git state (changes,
stashes, unpushed); worth a look; the marked list with a way off it; and
the disk, free now and after, with the review button carrying the
saving it would make.
- Home or the whole disk, from the top bar or with g.
- The mosaic stops hovering when the pointer leaves it, so its tooltip
never covers the panel handle.
Explore a scanned tree as a mosaic, mark what should go, review the list
and remove it, with the volume's free space live on screen.
- Keyboard and mouse throughout; keys act on the tile under the pointer
when the pointer moved last. Cursor tooltip above the whole window.
- The wheel magnifies toward a directory until it fills the view, then
goes into it; tiles telescope from where they were to where they are.
- Review screen with a segmented trash/permanent choice. The trash is the
default when available; a permanent deletion asks in an alert dialog.
- Layout follows the gpui-kit design guides: every size on one rem scale,
ctrl =/-/0 interface zoom, and colours derived from the Omarchy theme.
- Window-harness tests draw frames and press keys, end to end.