diff --git a/CLAUDE.md b/CLAUDE.md index 5b246c2..d4a8186 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -19,7 +19,7 @@ This repo is a collection of documentation files and scripts that fix Claude Cod |------|-------------------| | `image-paste.md` | `~/.local/bin/clip2png` (BMP→PNG clipboard poller) + `~/.claude/keybindings.json` (Alt+V) + `SessionStart` hook only (no SessionEnd) | | `shift-enter.md` | VSCode `/terminal-setup` + Windows Terminal `settings.json` action (`\u001b\r`) | -| `claude-notify.md` | `~/bin/claude-notify` (bash → PowerShell balloon tip) + `Stop` hook only — **WSL2 only** — skips if Windows Terminal is foreground | +| `claude-notify.md` | `~/bin/claude-notify` (bash → PowerShell balloon tip) + Claude `Stop` hook or Codex `notify` — **WSL2 only** — skips if Windows Terminal is foreground | | `claude-notify-powershell.md` | `%USERPROFILE%\.claude\claude-hook-toast.ps1` + `PermissionRequest` hook only — **native Windows PowerShell only** | | `statusline.md` | `~/.claude/statusline-command.sh` + `statusLine` in `~/.claude/settings.json` | | `settings.md` | `~/.claude/settings.json` `attribution` field + `~/.claude.json` `hasTrustDialogAccepted` | @@ -35,7 +35,7 @@ This repo is a collection of documentation files and scripts that fix Claude Cod **clip2png SessionEnd pitfall**: Do not add a `SessionEnd` hook to stop the poller. Claude Code fires `SessionStart`/`SessionEnd` for every subagent spawned by the Task tool. The subagent's `SessionEnd` would kill the poller mid-session for the main session. -**claude-notify async (WSL2)**: The `PermissionRequest` hook command must be wrapped as `bash -c '... &'` because the PowerShell script sleeps 6 s. Running it synchronously blocks Claude Code's UI for that duration. +**claude-notify async (WSL2)**: For Claude Code, wrap the `Stop` hook command as `bash -c '... &'` because the PowerShell script stays alive while the balloon is visible. For Codex, use `notify = ["bash", "-lc", "~/bin/claude-notify \"$1\" &", "--"]` in `~/.codex/config.toml`; Codex passes the JSON notification payload as a single argument. **claude-notify async (Windows PowerShell)**: Uses the Windows Toast API (`Windows.UI.Notifications`) via [soulee-dev/claude-code-notify-powershell](https://github.com/soulee-dev/claude-code-notify-powershell). The script reads hook event JSON from stdin. No async wrapper needed — toast fires and exits immediately. Only the `PermissionRequest` hook is used — notifications fire only when Claude needs you to approve a tool. Script lives at `%USERPROFILE%\.claude\claude-hook-toast.ps1`; hook configured in `C:\Users\cong\.claude\settings.json`. Both variants skip the notification when Windows Terminal is the foreground window. diff --git a/README.md b/README.md index 9c7d18e..a0e7ed6 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,7 @@ Claude will read the docs and configure everything. | [`lsp-setup.md`](lsp-setup.md) | **LSP** — `ENABLE_LSP_TOOL` + language servers for TypeScript, Python, Go, Rust | | [`image-paste.md`](image-paste.md) | Alt+V image paste — BMP→PNG converter + keybinding | | [`shift-enter.md`](shift-enter.md) | Shift+Enter newline in VSCode terminal and Windows Terminal | -| [`claude-notify.md`](claude-notify.md) | Windows balloon tip notification — WSL2 variant (bash → PowerShell) | +| [`claude-notify.md`](claude-notify.md) | Windows balloon tip notification — WSL2 variant for Claude Code hooks and Codex `notify` | | [`claude-notify-powershell.md`](claude-notify-powershell.md) + [`claude-hook-toast.ps1`](claude-hook-toast.ps1) | Windows toast notification — native PowerShell variant | | [`statusline.md`](statusline.md) | Status line — git branch, context bar, model, 5h/7d rate limit countdowns | | [`settings.md`](settings.md) | Disable git attribution, skip trust dialog |