SessionStart Hook hinzugefügt

- hooks/session-start.sh prüft auf Updates im Repo
- settings.json mit Hook-Konfiguration erweitert
- $HOME statt hardcoded Pfad für Geräte-Kompatibilität

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
root
2026-01-26 10:27:29 +01:00
parent 3c9a9112a7
commit 7aec5006ff
2 changed files with 36 additions and 1 deletions

22
hooks/session-start.sh Executable file
View File

@@ -0,0 +1,22 @@
#!/bin/bash
# Claude Code Session-Start Hook
# Prüft auf Updates im Settings-Repo
REPO_DIR="$HOME/dotfiles/claude_settings"
cd "$REPO_DIR" 2>/dev/null || exit 0
# Fetch ohne Output
git fetch origin --quiet 2>/dev/null || exit 0
# Prüfe ob Updates vorhanden
LOCAL=$(git rev-parse HEAD 2>/dev/null)
REMOTE=$(git rev-parse origin/main 2>/dev/null)
if [ "$LOCAL" != "$REMOTE" ]; then
BEHIND=$(git rev-list HEAD..origin/main --count 2>/dev/null)
echo "⚠ Claude Settings: $BEHIND neue Commits verfügbar!"
echo " → cd ~/dotfiles/claude_settings && git pull"
fi
exit 0

View File

@@ -1,9 +1,22 @@
{ {
"statusLine": { "statusLine": {
"type": "command", "type": "command",
"command": "/home/rwiegand/.claude/statusline-command.sh" "command": "$HOME/.claude/statusline-command.sh"
}, },
"enabledPlugins": { "enabledPlugins": {
"superpowers@claude-plugins-official": true "superpowers@claude-plugins-official": true
},
"hooks": {
"SessionStart": [
{
"hooks": [
{
"type": "command",
"command": "$HOME/.claude/hooks/session-start.sh",
"timeout": 30
}
]
}
]
} }
} }