docs: cross-platform focus-aware notification example (WSL + macOS + Linux) - #45326
Open
davissekai wants to merge 2 commits into
Open
docs: cross-platform focus-aware notification example (WSL + macOS + Linux)#45326davissekai wants to merge 2 commits into
davissekai wants to merge 2 commits into
Conversation
Author
|
Fixed PR description to follow template — added Issue, Type of change, What does this PR do, How verified, Screenshots, Checklist sections. Ready for review. |
Contributor
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
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.
Issue for this PR
Closes #4846
Related #213
Type of change
What does this PR do?
The plugins docs showed a macOS-only
osascriptexample for notifications. It fails on WSL/Linux and most community plugins are also macOS-only.This updates
packages/web/src/content/docs/plugins.mdxto a cross-platform, focus-aware example:Windows.UI.Notificationstoastosascriptnotify-sendGetForegroundWindowon WSL,osascript frontmoston macOS,xdotoolon Linux)session.idle,session.error, andpermission.updated/permission.askwith debounce, visual only by defaultIt also points to the community plugin
opencode-notify-crossx(https://github.com/davissekai/opencode-notify-crossx) for the full source, and shows a single-file local alternative that works without npm.How did you verify your code works?
notify plugin loaded (focus-aware)suppressed (focused)at 16:04:50opencode — input neededat 16:05:52session.idlesuppress/notify in the same wayScreenshots / recordings
Tested via Windows toast — no screenshot needed for docs-only change. Log lines above show both paths.
Checklist