Skip to content

Reload the terminal after NMSh writes host files (Kitty, Ghostty 1.3+) - #527

Draft
raiseCatError wants to merge 1 commit into
feature/appearance-ui-redesign-20261029from
feature/host-live-reload-20261029
Draft

raiseCatError wants to merge 1 commit into
feature/appearance-ui-redesign-20261029from
feature/host-live-reload-20261029

Conversation

@raiseCatError

Copy link
Copy Markdown
Owner

Stacked on #526. After NMSh rewrites one of its own host files, it asks the terminal it runs in to reload, so opacity, blur, shaders and /cursor changes show at once.

  • Kitty: its documented SIGUSR1, sent only to KITTY_PID when that process is a verified parent of NMSh (this already existed for Kitty shaders; now also for /appearance and /cursor).
  • Ghostty: SIGUSR2, sent only to a verified parent Ghostty 1.3 or newer. On 1.3.1, NMSh's tests show opacity and blur applying on reload, even from an opaque start. A successful reload clears the "reload pending" record. Older Ghostty, tmux and unverified cases keep the manual instruction, because an unhandled SIGUSR2 would close the window.
  • Kitty limit (observed on 0.49.2): a window that opened at opacity 1 stays opaque after a reload. NMSh says so after the write, and asks for one restart; from then on, changes apply live.
  • The /appearance hub warns that blur shows only below 100% opacity.
  • Nothing is signalled under the test runner unless a test injects the signal.

Physical QA in a disposable Kitty 0.49.2 (private config):

  • Opaque start: NMSh wrote 85% opacity with blur 8. It reloaded Kitty, the window stayed opaque, and the message asked for one restart.
  • After the restart: NMSh changed opacity 85% → 60%. Mean window brightness went 35 → 84 immediately, with no manual reload.

The Ghostty reload was tested in an isolated Ghostty 1.3.1 with SIGUSR2 (0.6 → 1.0 → 0.4, including from an opaque start). The NMSh-driven Ghostty flow was not run physically, because it would write the user's real Ghostty config.

Tests: new tests/hostReload.test.ts. 163 related focused tests pass, and tsc is clean.

…y, blur, shaders and /cursor apply at once

Kitty gets its documented SIGUSR1 and Ghostty 1.3+ its SIGUSR2, only when the process is a verified parent of NMSh;
older Ghostty, tmux and unverified cases keep the manual reload instruction. A successful Ghostty reload clears the
reload-pending record. Kitty windows that opened fully opaque need one restart for transparency (observed on 0.49.2);
NMSh says so. The hub warns that blur shows only below 100% opacity. Nothing is signalled under the test runner.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant