Something went wrong. Try again.
Something went wrong. Try again.
4 folders · 1 file
README.md
notification-hook #
Linux-only desktop notification plugin for Claude Code. Plays a sound and shows a desktop notification when Claude Code fires a notification event (e.g. waiting for input, permission prompt).
Platform: Linux (X11) only.
Hook #
Registered as a Notification hook with an empty matcher, so it fires
on every notification Claude Code emits (permission prompts, idle-input
waits, and so on). There is no per-type filtering.
Features #
- Desktop notification via
notify-sendwith project name and session context - Sound playback via
ffplay - tmux integration: notification includes the tmux pane label, and clicking "Focus" activates the correct window/pane
- Session name extraction from the transcript file
Sound file resolution #
The script resolves the notification sound in this order:
CLAUDE_NOTIFY_SOUNDenvironment variable (absolute path to any audio file)- Bundled
resources/bell.oga(freedesktop bell, shipped with the plugin) /usr/share/sounds/freedesktop/stereo/bell.oga(system fallback)
Dependencies #
These must be in PATH at runtime:
| Binary | Package (NixOS) | Purpose |
|---|---|---|
ffplay |
ffmpeg |
Sound playback |
jq |
jq |
JSON parsing of hook input |
notify-send |
libnotify |
Desktop notifications |
tmux |
tmux |
Session/pane label (optional, only used inside tmux) |
xdotool |
xdotool |
Window focus on notification click (optional) |
xprop |
xorg.xprop |
Window name verification for focus (optional) |
On NixOS, ensure these are in home.packages or environment.systemPackages.
Installation #
/plugin install notification-hook@jcmuller-plugins