refactor(kitty-logging): move watcher to scripts/ and symlink it #71

Merged
rootiest merged 1 commits from refactor-kitty-watcher-symlink into main 2026-07-21 18:10:43 +00:00
Owner

Summary

Why: The Kitty watcher lived alone in a single-purpose kitty/ directory and was copied into the Kitty config dir, which required a whole version-staleness apparatus (version markers, -gt comparison, "updated" vs "installed" messaging) just to keep the copy fresh. A symlink gives that for free.

What:

  • Moved kitty/fish-config-watcher.pyscripts/kitty-fish-config-watcher.py (renamed to carry the kitty prefix); removed the now-empty kitty/ directory.
  • kitty-logging install now symlinks the watcher into the Kitty config dir (ln -sfn) instead of copying — it always tracks the canonical source, so the staleness comparison is gone.
  • kitty-logging uninstall now removes a symlink (including a dangling one) or a legacy copied file.
  • The installed filename in the Kitty config dir stays fish-config-watcher.py, so existing kitty.conf managed blocks keep working; installs migrate on the next install.
  • Updated docs: README.md, docs/fish-config.md (SSoT), docs/wiki/7-customization.md, and the script header.

Note: A symlink dangles if the fish config dir is absent (e.g. a shared kitty.conf on a non-fish machine) where a copy would survive — a non-issue for this single-machine dotfiles setup.

Manual Verification

  • Fresh install: run kitty-logging install, then confirm ~/.config/kitty/fish-config-watcher.py is a symlink (ls -l) pointing at ~/.config/fish/scripts/kitty-fish-config-watcher.py.
  • kitty-logging status reports the watcher installed with the correct version and shows the managed block present.
  • Migration: with an old copied watcher in place, re-run kitty-logging install and confirm the regular file is replaced by the symlink.
  • kitty-logging uninstall removes both the managed block from kitty.conf and the watcher symlink; re-run confirms idempotent no-op.
  • Open a new Kitty window, exit the session, and confirm scrollback capture still works (C5 logging enabled).
## Summary **Why:** The Kitty watcher lived alone in a single-purpose `kitty/` directory and was *copied* into the Kitty config dir, which required a whole version-staleness apparatus (version markers, `-gt` comparison, "updated" vs "installed" messaging) just to keep the copy fresh. A symlink gives that for free. **What:** - Moved `kitty/fish-config-watcher.py` → `scripts/kitty-fish-config-watcher.py` (renamed to carry the `kitty` prefix); removed the now-empty `kitty/` directory. - `kitty-logging install` now **symlinks** the watcher into the Kitty config dir (`ln -sfn`) instead of copying — it always tracks the canonical source, so the staleness comparison is gone. - `kitty-logging uninstall` now removes a symlink (including a dangling one) or a legacy copied file. - The installed filename in the Kitty config dir stays `fish-config-watcher.py`, so existing `kitty.conf` managed blocks keep working; installs migrate on the next `install`. - Updated docs: `README.md`, `docs/fish-config.md` (SSoT), `docs/wiki/7-customization.md`, and the script header. **Note:** A symlink dangles if the fish config dir is absent (e.g. a shared `kitty.conf` on a non-fish machine) where a copy would survive — a non-issue for this single-machine dotfiles setup. ## Manual Verification - [x] Fresh install: run `kitty-logging install`, then confirm `~/.config/kitty/fish-config-watcher.py` is a symlink (`ls -l`) pointing at `~/.config/fish/scripts/kitty-fish-config-watcher.py`. - [x] `kitty-logging status` reports the watcher installed with the correct version and shows the managed block present. - [x] Migration: with an old *copied* watcher in place, re-run `kitty-logging install` and confirm the regular file is replaced by the symlink. - [x] `kitty-logging uninstall` removes both the managed block from `kitty.conf` and the watcher symlink; re-run confirms idempotent no-op. - [x] Open a new Kitty window, exit the session, and confirm scrollback capture still works (C5 logging enabled).
rootiest added 1 commit 2026-07-16 06:40:05 +00:00
Relocate the Kitty scrollback watcher out of the single-purpose kitty/
directory into scripts/kitty-fish-config-watcher.py, and change the
installer to symlink it into the Kitty config directory instead of
copying it.

The symlink always tracks the canonical source, which removes the
version-staleness comparison and the copy-vs-refresh messaging. uninstall
now removes a symlink (including a dangling one) or a legacy copied file.
Existing installs migrate automatically on the next `kitty-logging install`.

Docs (README, docs/fish-config.md, wiki) updated to match.
rootiest merged commit f674ae303c into main 2026-07-21 18:10:43 +00:00
rootiest deleted branch refactor-kitty-watcher-symlink 2026-07-21 18:10:44 +00:00
Sign in to join this conversation.