-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
27 lines (24 loc) · 838 Bytes
/
Copy pathsetup.sh
File metadata and controls
27 lines (24 loc) · 838 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/usr/bin/env bash
# setup.sh — Pre-install dependencies for macOS/Linux (called at SessionStart)
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
ICON_DIR="$HOME/.claude"
ICON_PATH="$ICON_DIR/notify-icon.png"
PLUGIN_ICON="$SCRIPT_DIR/notify-icon.png"
# Copy bundled icon if missing
if [ ! -f "$ICON_PATH" ] && [ -f "$PLUGIN_ICON" ]; then
mkdir -p "$ICON_DIR"
cp "$PLUGIN_ICON" "$ICON_PATH"
fi
# macOS: check terminal-notifier
if [ "$(uname -s)" = "Darwin" ]; then
if ! command -v terminal-notifier &>/dev/null; then
echo "[claude-code-notify] tip: brew install terminal-notifier for icon support"
fi
fi
# Linux: check notify-send
if [ "$(uname -s)" = "Linux" ]; then
if ! command -v notify-send &>/dev/null; then
echo "[claude-code-notify] tip: sudo apt install libnotify-bin"
fi
fi