diff options
Diffstat (limited to 'desktop/modules/status/notify-sound')
| -rwxr-xr-x | desktop/modules/status/notify-sound | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/desktop/modules/status/notify-sound b/desktop/modules/status/notify-sound index c028b3e..36efaaa 100755 --- a/desktop/modules/status/notify-sound +++ b/desktop/modules/status/notify-sound @@ -15,7 +15,7 @@ # silence both. Their popups do not come through here and are unaffected. # # notify-sound claude Claude Code's Notification hook -# notify-sound <opencode-notifier event> the notifier's command hook +# notify-sound <event> <session> the opencode notifier's command hook # # An argument with no sound plays nothing. That is deliberate: the opencode # notifier runs its command for every event, session_started and @@ -24,6 +24,14 @@ set -u here="$(dirname "$(readlink -f "$0")")" + +# opencode's notifier passes its event and session id: forward them to the +# agent lamp, before the quiet check, since quiet mutes sound and not light. +# Claude Code passes one argument and has hooks of its own for the lamp. +if [[ $# -eq 2 ]] && command -v agent-lamp >/dev/null; then + agent-lamp "$1" "$2" </dev/null >/dev/null 2>&1 & +fi + [[ "$("$here/statusctl" quiet get)" == "1" ]] && exit 0 dir="${NOTIFY_SOUND_DIR:-$HOME/Music/notify}" |
