Claude notifications: clicking one brings back the app Claude runs in
shellcheck / shellcheck (push) Successful in 18s

The hooks ran notify-send from inside Claude, so GNOME couldn't tell which
app the notification came from and clicking it did nothing. system/claude-notify
finds the terminal or editor among Claude's parent processes (or tmux's
client, or the Flatpak) and names it in the desktop-entry hint. The title
shows the project folder and the body Claude's own message.

claude.sh swaps the old notify-send hooks for it, only where they're still
the ones CoreDesktop wrote, and 70-claude.sh now runs claude.sh on every
update so existing machines get it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-25 07:52:09 -07:00
co-authored by Claude Opus 5.5
parent 774ff3f673
commit 4fb35397ee
5 changed files with 251 additions and 15 deletions
+5 -10
View File
@@ -2,13 +2,8 @@
COREDESKTOP="$HOME/.local/share/coredesktop"
# claude.sh has run if Claude Code is installed, ~/.local/bin is on PATH in
# .bashrc, and the notification settings file exists
if command -v claude &>/dev/null \
&& grep -qF 'export PATH="$HOME/.local/bin:$PATH"' ~/.bashrc 2>/dev/null \
&& [ -f "$HOME/.claude/settings.json" ]; then
echo "Claude Code already set up."
else
echo "Setting up Claude Code..."
bash "$COREDESKTOP/claude.sh"
fi
# claude.sh installs Claude Code if it's missing, puts ~/.local/bin on PATH and
# sets up its notifications. Each step does nothing if it's already done, so it
# runs on every update, and changes to the notifications reach this machine.
echo "Setting up Claude Code..."
bash "$COREDESKTOP/claude.sh"