# Local Files A local file browser beside the active Herdr Desktop session. It always uses the machine displaying the window, even when the selected space runs remotely. ![Local Files](preview.png) ## What you see A panel with a Local files header and the selected folder name. Below are a search field, Home/Documents/Downloads/Pictures shortcuts, hidden-file and sort controls, and a Manage button. The tree uses theme colors, accented folder icons and bold folder names. Each row offers Open and Copy path. Selecting a text file replaces the tree with a read-only preview and a back button. ## How it behaves Shortcut buttons make their folder the root and remember the selection; Home returns to the user's home. Folder rows expand lazily. Search starts on Enter and scans the chosen root by filename; clearing the field returns to the tree. Hidden toggles dotfiles. Sort cycles through name, date, size and type. Open uses the system's default application; Manage opens the current root in the file manager. Copy path copies an absolute local path. Search stops at 100,000 entries or 500 matches; folders are capped at 500 entries and the expanded tree at 5,000. Directory symlinks are not traversed by search. `.git` is excluded. Previews are read-only and truncated at 400,000 characters. ## Built from One `mods/local-files` block in a personal layout, sized to fit. `main.js` is a GPUI View using `home`, `appHome`, `exec`, `readTextFile`, `theme`, `settings`, `window`, and `notify`, and GPUI input and editor controls. `files.py` uses Python 3 to list and search local files; `git` obtains optional status marks. `xdg-open` opens files and folders. Four SVG icons are included. The code derives from Herdr's Apache-2.0 Files mod. It reads local file names, metadata and selected text, launches local programs, and makes no network requests. The mod has `place: none`; layout integration is needed. ## Watch out Linux only for Open/Manage; Python 3 and xdg-open must be available. Shortcuts assume conventional home-folder names, not XDG user-directory overrides. Herdr calls the local machine's helper regardless of the active space. Copying a local path does not transfer the file to a remote agent. Do not overwrite an existing mod or shipped layout. Preserve keyboard focus in the search input; invalidate old asynchronous search results when the input or root changes. No operation changes or deletes files directly. Folder and search caps can omit results. ## Done when Herdr's mod check passes; the panel renders without errors; each shortcut changes the tree root and Home returns; hidden files and each sorting mode work; search is scoped to the selected root; preview, copy path and opening a local file work; and the local tree stays local in a remote space. Run the Python tests as well.