Send dunstify notifications on permission_prompt and idle_prompt
events via a shell script alongside the existing guix-check hook.
Uses a single Notification matcher entry in project settings.json
referenced via CLAUDE_PROJECT_DIR.
Co-Authored-By: Claude <noreply@anthropic.com>
--- /dev/null
+#!/bin/sh
+# Copyright (c) 2026 Jakub Czajka <jakub@ekhem.eu.org>
+# License: GPL-3.0 or later.
+#
+# notify — send a desktop notification for Claude Code events.
+
+type=$(sed -n \
+ 's/.*"notification_type":"\([^"]*\)".*/\1/p')
+case "$type" in
+ permission_prompt)
+ body="🤖🔐 Needs Approval"
+ ;;
+ idle_prompt)
+ body="🤖✅ Finished"
+ ;;
+ *)
+ exit 0
+ ;;
+esac
+
+$HOME/.guix-home/profile/bin/dunstify \
+ --urgency normal \
+ --timeout 10000 \
+ --appname "Claude Code" \
+ "Claude Code" \
+ "$body"
}
]
}
+ ],
+ "Notification": [
+ {
+ "matcher": "permission_prompt|idle_prompt",
+ "hooks": [
+ {
+ "type": "command",
+ "command": "${CLAUDE_PROJECT_DIR}/.claude/hooks/notify",
+ "async": true
+ }
+ ]
+ }
]
}
}