Created
May 15, 2026 10:36
-
-
Save dmateusp/b7e61ada4b2ccf64a657ee17a7561d54 to your computer and use it in GitHub Desktop.
[~/.claude/settings.json] Terminal notifications for Claude Code + VSCode + MacOSX using terminal-notifier: focuses on the VSCode window that Claude notified from, adds the git branch to the notification
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
| { | |
| "effortLevel": "medium", | |
| "model": "sonnet[1m]", | |
| "hooks": { | |
| "PreToolUse": [ | |
| { | |
| "matcher": "AskUserQuestion", | |
| "hooks": [ | |
| { | |
| "type": "command", | |
| "command": "terminal-notifier -message \"Claude has a question in $(basename $PWD)$(git rev-parse --abbrev-ref HEAD 2>/dev/null | sed 's/.*/ [&]/')\" -title \"Claude Code\" -contentImage \"/Applications/Visual Studio Code.app/Contents/Resources/Code.icns\" -sound Glass -execute \"$(which code) --reuse-window '$PWD'\"" | |
| } | |
| ] | |
| }, | |
| { | |
| "matcher": "ExitPlanMode", | |
| "hooks": [ | |
| { | |
| "type": "command", | |
| "command": "terminal-notifier -message \"Plan ready for review in $(basename $PWD)$(git rev-parse --abbrev-ref HEAD 2>/dev/null | sed 's/.*/ [&]/')\" -title \"Claude Code\" -contentImage \"/Applications/Visual Studio Code.app/Contents/Resources/Code.icns\" -sound Glass -execute \"$(which code) --reuse-window '$PWD'\"" | |
| } | |
| ] | |
| } | |
| ], | |
| "PermissionRequest": [ | |
| { | |
| "matcher": "", | |
| "hooks": [ | |
| { | |
| "type": "command", | |
| "command": "terminal-notifier -message \"Permission required in $(basename $PWD)$(git rev-parse --abbrev-ref HEAD 2>/dev/null | sed 's/.*/ [&]/')\" -title \"Claude Code\" -contentImage \"/Applications/Visual Studio Code.app/Contents/Resources/Code.icns\" -sound Glass -execute \"$(which code) --reuse-window '$PWD'\"" | |
| } | |
| ] | |
| } | |
| ], | |
| "Stop": [ | |
| { | |
| "matcher": "", | |
| "hooks": [ | |
| { | |
| "type": "command", | |
| "command": "terminal-notifier -message \"Task completed in $(basename $PWD)$(git rev-parse --abbrev-ref HEAD 2>/dev/null | sed 's/.*/ [&]/')\" -title \"Claude Code\" -contentImage \"/Applications/Visual Studio Code.app/Contents/Resources/Code.icns\" -sound Glass -execute \"$(which code) --reuse-window '$PWD'\"" | |
| } | |
| ] | |
| } | |
| ] | |
| } | |
| } |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For this to work you need:
brew install terminal-notifier)codecommandbrew install git)