feat: OSC 133 shell integration and OSC 777 desktop notifications (split, independent flags)#48
Merged
Merged
Conversation
OSC 133 A/B/C/D sequences track shell prompt/command state on the grid. The status bar shows a › indicator (theme.palette[6]) when the shell is waiting for input (state B) and a ✗ N badge (theme.palette[1]) when the last command exited non-zero; the badge clears when a new prompt starts (A). The left status cluster now lays out REC / bell / prompt / exit-code indicators with a running x cursor so they no longer overlap. Gated behind general.shell_integration (default true) and exposed in the TUI config panel as F_SHELL_INTEGRATION = 39.
OSC 777 notify;title;body requests a desktop notification. The parser stamps it onto the grid (pending_notification); the parser thread drains it under the write lock and emits a new ParseEffect::Notification, which drain_effects dispatches on the main thread via notify-send (Linux) / osascript (macOS) from a detached thread. Gated behind its own general.desktop_notifications flag (default true, F_DESKTOP_NOTIFICATIONS = 40) — independent of shell_integration, so prompt markers and desktop popups can be toggled separately.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Splits the previously-mixed
feat/shell-integration-osc133-osc777branch (commitae2349b) into two independent features behind two independent flags, re-implemented against the current refactoredmain.Why
The original commit bundled two unrelated features behind a single
general.shell_integrationflag, so prompt markers and desktop popups could not be toggled separately. This PR separates them — one concern per commit, one flag per feature.Commits
general.shell_integration›(waiting for input) and✗ N(last command exited non-zero)general.desktop_notificationsnotify;title;body→ desktop notification vianotify-send(Linux) /osascript(macOS) on a detached threadParseEffect::Notification(the parser thread can't reachConfigafter the RwLock-grid + effects-channel refactor); dispatched indrain_effectsBoth flags default
trueand are exposed in the TUI config panel (F_SHELL_INTEGRATION = 39,F_DESKTOP_NOTIFICATIONS = 40).Verification
cargo fmt --check,cargo clippy --locked -- -D warnings,cargo testall clean on each commitkm scoreabsolute 86.4 (B+), above thefail_below = "B"floorSupersedes the unmerged
feat/shell-integration-osc133-osc777branch.