Slide 17
Slide 17 text
17
"hooks": {
"Stop": [
{
"matcher": "",
"hooks": [
{
"type": "command",
"command": "~/dotfiles/home-manager/programs/claude/hooks/notify.ts"
}
]
}
],
"Notification": [
{
"matcher": "",
"hooks": [
{
"type": "command",
"command": "~/dotfiles/home-manager/programs/claude/hooks/notify.ts"
}
]
}
]
},
#!/etc/profiles/per-user/shuntaka/bin/denor un --allow-run --allow-env
// (中略)
if (data.hook_event_name == "Stop") {
process = new Deno.Command("osascript", {
args: [
"-e",
`display notification "Task Completed 🚀" with title "⚡ Claude Code" subtitle
"${repoInfo} 📦"`,
],
stdout: "piped",
stderr: "piped",
});
} else if (data.hook_event_name == "Notification") {
process = new Deno.Command("osascript", {
args: [
"-e",
`display notification "Awaiting Confirmation 🔔" with title "⚡ Claude Code" subtitle
"${repoInfo} 📦"`,
],
stdout: "piped",
stderr: "piped",
});
}
https://github.com/shuntaka9576/dotfiles/blob/ccfb7d237c8d920e7a128cf2128ed0c216e05252/home-manager/programs/claude/hooks/notify.ts
https://github.com/shuntaka9576/dotfiles/blob/ccfb7d237c8d920e7a128cf2128ed0c216e05252/home-manager/programs/claude/settings.json