From a3fa6524b744ea062ea0197bb3a0fec7ec9c6b54 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Mon, 16 Nov 2026 13:28:21 +0100 Subject: status: nolamp mode and the agent-lamp forward nolamp keeps agent-lamp's bulb dark; notify-sound forwards opencode's event and session to agent-lamp before the quiet check. Co-Authored-By: Claude Opus 5.5 --- desktop/modules/status/notify-sound | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'desktop/modules/status/notify-sound') 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 the notifier's command hook +# notify-sound 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 2>&1 & +fi + [[ "$("$here/statusctl" quiet get)" == "1" ]] && exit 0 dir="${NOTIFY_SOUND_DIR:-$HOME/Music/notify}" -- cgit v1.2.3