aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rwxr-xr-xbin/__claude-code-notify14
1 files changed, 6 insertions, 8 deletions
diff --git a/bin/__claude-code-notify b/bin/__claude-code-notify
index 18e3ac5..7728ab4 100755
--- a/bin/__claude-code-notify
+++ b/bin/__claude-code-notify
@@ -1,19 +1,17 @@
#!/bin/sh
+message="$(jq -r '.message // "Task completed"')"
if [ "$(uname)" = "Darwin" ]; then
if [ "$1" = "Stop" ]; then
- message="Task completed"
sound=Glass
else
- message="$(jq '.message')"
sound=Funk
fi
- osascript -e "display notification $message with title \"Claude Code\" sound name \"$sound\""
+ osascript \
+ -e 'on run argv' \
+ -e 'display notification (item 1 of argv) with title (item 2 of argv) sound name (item 3 of argv)' \
+ -e 'end run' \
+ $message "Claude Code" $sound
else
- if [ "$1" = "Stop" ]; then
- message="Task completed"
- else
- message="$(jq '.message')"
- fi
notify-send "Claude Code" "$message"
fi