# tailnew Follows the newest file in a directory, like `tail -f`, and switches to each new file as it appears. Built for watching harnesses such as boxmaker's `tools/run-plan.sh`, which write one log per task. make install # ~/.local/bin/tailnew and a desktop entry for the window tailnew .state/runs/M2a # plain output, `==> file <==` banner on each switch tailnew -t -r .state/runs # full-screen terminal view, every milestone's directory tailnew --gui -r .state/runs # desktop window (egui) tailnew --gui # desktop window, asks for the folder first `make gate` checks formatting, runs clippy with and without the window, runs the tests, and validates the desktop entry. `PREFIX=/usr/local make install` installs elsewhere; `cargo build --no-default-features` builds without the window. A file is new when its name has not been seen before, when the name now points at a different file, or when it has shrunk (a rerun that truncated its old log with `>`). The directory is polled (`-i MS`, default 250) and need not exist yet. Hidden files are ignored; `-g '*.log'` narrows the match further. Keys in the full-screen terminal view (`-t`): | key | action | |-------------------------|----------------------------------------------------| | ↑ ↓ / k j | scroll a line | | PgUp PgDn / b space | scroll a page (ctrl-u / ctrl-d: half a page) | | g / G | top / back to following the tail | | [ ] | older / newer file (pins the view to it) | | p | pin to the current file; again to unpin and jump to the newest | | L | unpin and jump to the newest file | | w | toggle line wrapping | | f | toggle the file list | | q / esc | quit | The window (`--gui`) has a **Folder…** button (the desktop's folder dialog, also `o`) and a **Recursive** checkbox, buttons for the same file controls, a clickable file list, and the keys `[` `]` `p` `L` `f`, `G`/End to jump to the end, and `q`/Esc to quit. Started without a folder, as from the launcher, it opens the folder dialog straight away. It scrolls with the mouse, sticks to the bottom while you are there, and does not wrap long lines (scroll sideways instead).