diff options
| author | nsfisis <nsfisis@gmail.com> | 2025-07-04 15:56:30 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2025-07-04 15:56:30 +0900 |
| commit | 46319863cd44fbc3cce05d930f5f81fdc02dc74e (patch) | |
| tree | 4c7e5fa0fb9eee8256771c026188a7d6adc4ba47 | |
| parent | 0e13c5b607a886572f6ce24d45e1435038653a30 (diff) | |
| download | dotfiles-46319863cd44fbc3cce05d930f5f81fdc02dc74e.tar.gz dotfiles-46319863cd44fbc3cce05d930f5f81fdc02dc74e.tar.zst dotfiles-46319863cd44fbc3cce05d930f5f81fdc02dc74e.zip | |
claude-code: fix __claude-code-notify
| -rwxr-xr-x | bin/__claude-code-notify | 14 |
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 |
