diff options
| author | Danilo M. <danix@danix.xyz> | 2026-11-16 13:28:21 +0100 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-11-16 13:28:21 +0100 |
| commit | a3fa6524b744ea062ea0197bb3a0fec7ec9c6b54 (patch) | |
| tree | 32b0dfb8709ce46a0903d7ce916658047b3db617 /desktop/modules/status/notify-sound | |
| parent | acc837d722d6905b47f0b673b84b02345867fb6e (diff) | |
| download | quickshell-a3fa6524b744ea062ea0197bb3a0fec7ec9c6b54.tar.gz quickshell-a3fa6524b744ea062ea0197bb3a0fec7ec9c6b54.zip | |
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 <noreply@anthropic.com>
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}" |
