vault-sync: 2026-09-16 12:01 (jimmy)
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
#!/usr/bin/env bash
|
||||
# =============================================================================
|
||||
# Hook: Desktop Notification (Notification event)
|
||||
# =============================================================================
|
||||
# Sends a macOS/Linux desktop notification when your agent platform needs attention.
|
||||
# Useful during long agent chains that can take several minutes.
|
||||
#
|
||||
# macOS: uses osascript (built-in)
|
||||
# Linux: uses notify-send (install with: sudo apt install libnotify-bin)
|
||||
# =============================================================================
|
||||
|
||||
INPUT=$(cat)
|
||||
TITLE=$(echo "$INPUT" | jq -r '.args.title // "Second Brain Crew"' 2>/dev/null)
|
||||
MESSAGE=$(echo "$INPUT" | jq -r '.args.message // "Your obsidian crew needs your attention"' 2>/dev/null)
|
||||
|
||||
if [[ "$(uname)" == "Darwin" ]]; then
|
||||
osascript -e "display notification \"$MESSAGE\" with title \"$TITLE\"" 2>/dev/null
|
||||
elif command -v notify-send &>/dev/null; then
|
||||
notify-send "$TITLE" "$MESSAGE" 2>/dev/null
|
||||
fi
|
||||
|
||||
exit 0
|
||||
Reference in New Issue
Block a user