Python Herdr plugin that opens a filelist row under the focused pane and follows its working directory — locally and over SSH.
The row follows the focused pane. Over SSH it parses the remote cwd from the
focused pane's own shell prompt, so it tracks cd into subdirectories on the
remote host.
Requires uv (runs the single-file script with PEP 723 metadata; a plain
python3 filelist.py also works). SSH panes need passwordless key auth to the
remote host (ssh-copy-id), since the remote listing runs non-interactively with
BatchMode=yes.
Install locally while developing:
herdr plugin link .Or install from GitHub once published:
herdr plugin install devskale/herdr-flistRunning the open action splits the focused pane to the right (without
stealing focus) and renders a live listing of the focused pane's cwd. The pane
self-narrows to a sidebar width on startup, so it docks as a right column rather
than a 50/50 split:
herdr plugin action invoke open --plugin herdr-flist- Local panes: the cwd comes from Herdr (OSC 7). Entries are sorted
dirs-first, colorized by type, and tagged with a git status gutter
(
MADR?!). The view is laid out to the pane's own size — a title rule with the~-abbreviated path, a width-fit listing, and a footer with the item count and git branch. - SSH panes: Herdr drops remote-host cwd reporting, so the remote cwd is parsed
from the focused pane's own shell prompt and listed over
ssh. This is what lets the view follow the remote shell into subdirectories. The interactive features (browse, in-pane preview, settings toggles, Enter-open) are local-only — over SSH the pane is a read-only listing. - Update gating: the listing only refreshes while its pane is on screen (the focused pane's tab); a background tab pauses and refreshes the moment you return. Clicking the filelist pane itself doesn't change the view — it holds the last followed directory instead of jumping to its own.
- Interaction: click an entry to select it (reverse-video bar); click the
selected entry again for a
...action menu (Open in new pane / cd into the followed pane / Copy path). With the pane focused it's ranger-like: focusing auto-selects the first entry; ↑/↓ move the selection; → descends into a directory or opens an in-pane preview of a file (filename as the title, content beneath; ↑/↓ scroll, ← or click goes back); ← ascends to the parent directory. Browsing is local-only and resumes following when you focus another pane. A\u2699in the footer opens a settings overlay (show hidden files / git status / dirs first / last-edited first).Enteropens the selected entry (dir descends, file opens with the default app). The pane enables SGR mouse reporting, so — as in any terminal multiplexer — the first click on an unfocused filelist only focuses it; subsequent clicks select.
The pane is a normal Herdr pane after creation. The plugin does not clean it up or manage its lifecycle.
Optional keybind:
[[keys.command]]
key = "prefix+f"
type = "plugin_action"
command = "herdr-flist.open"
description = "open filelist row"- Single file, no pip dependencies:
filelist.py(run viauv run, PEP 723 inline metadata declaresrequires-python = ">=3.9"and no deps). - Recognizes common prompt shapes:
user@host:~/path$, bare~/path$,/path>. - Tunables (environment variables):
HERDR_FILELIST_WIDTH(sidebar width fraction, default0.3;0disables self-sizing),HERDR_FILELIST_INTERVAL(poll seconds, default1),HERDR_FILELIST_REMOTE_CACHE(3s),HERDR_FILELIST_SSH_TIMEOUT(5s).
PLUGINS.md is a field guide to the Herdr plugin model built around this plugin
— manifest contract, injected environment, where pane cwd comes from, and the
SSH cwd gap that motivated the prompt-parsing approach.
herdr-flist is a community plugin, not part of Herdr itself.
