feat(watcher): add scrollback history logging on window/pane close

Introduces watcher.py — a kitty Python watcher that captures terminal
scrollback to ~/.terminal_history/ whenever any window or pane is closed
via Ctrl+D, keybind, or full kitty quit. Works alongside the fish
smart_exit function, which handles graceful shell exits and sets a
user var flag to prevent duplicate logs.

Fixes the kitty.conf watcher directive (removed invalid --type=global
prefix that caused a FileNotFoundError on every kitty startup).
This commit is contained in:
2026-05-30 23:40:53 -04:00
parent be139ac7ad
commit 9d34764815
3 changed files with 97 additions and 0 deletions
+4
View File
@@ -11,6 +11,10 @@ notify_on_cmd_finish never
copy_on_select yes
# }}}
# {{{ Watcher
watcher watcher.py
# }}}
# {{{ Window
remember_window_size no
initial_window_width 150c