ClaudeMods
☰
ZH-CN
● 0 人在线 · 浏览 0 次
赞助提交作品
GitHub 仓库 · 发布者 myUdav4iik

done-sound

Claude 完成一轮时播放 macOS 系统声音

myUdav4iik@myUdav4iik

myUdav4iik/claude-mods/tree/main/done-sound

已翻译

关于这个 mod

Claude 完成回复时播放声音,因此你可以在长任务期间切换到另一个窗口,听到完成提示。回复正常完成时播放 "Glass" 系统声音;回合因错误或拒绝结束时播放 "Basso"。你自己停止回合或子智能体完成时不会播放声音。命令:/sound、/sound off、/sound on、/sound test。设置:sound(Glass)、errorSound(Basso)、minSeconds(0)。通过 claude plugin configure done-sound@claude-mods 配置。钩子:session.start、用于声音的 command.run、使用 afplay 的 turn.complete。需要 macOS。

安装

请先查看作者 README 确认 marketplace 和插件名称;命令可能随仓库结构改变。

claude plugin marketplace add myUdav4iik/claude-mods
claude plugin install done-sound
原文 / README

done-sound

Plays a sound when Claude finishes a reply, so you can switch to another window during a long task and hear when it's done.

  • Reply finished: plays the "Glass" system sound.
  • Turn ended on an error or a refusal: plays "Basso" instead, so you can tell the two apart.
  • No sound when you stop a turn yourself (you're already at the keyboard), or when a subagent finishes part of a larger task.

The sound plays in the background, so it never delays the end of a turn.

Usage

| Command | Does | | --- | --- | | /sound | Mutes or unmutes | | /sound off | Mutes | | /sound on | Unmutes | | /sound test | Plays the done sound now |

The command runs at once, even while Claude is working. Muting is remembered across sessions, and the status line shows sound off while muted.

Settings

| Setting | Default | Does | | --- | --- | --- | | sound | Glass | The sound for a finished reply | | errorSound | Basso | The sound for an error or a refusal | | minSeconds | 0 | Stays silent for turns shorter than this many seconds. Set it to around 15 to hear only long tasks. |

sound and errorSound take any macOS system sound: Basso, Blow, Bottle, Frog, Funk, Glass, Hero, Morse, Ping, Pop, Purr, Sosumi, Submarine or Tink.

The settings appear in Claude Code's config menu. To see or set them from the command line:

claude plugin configure done-sound@claude-mods

How it works

| Hook | What it does | | --- | --- | | session.start | Registers /sound, and shows sound off in the status line if muted. | | command.run for sound | Handles /sound. | | turn.complete | After a turn of the main conversation ends, plays the sound with afplay from /System/Library/Sounds, from a timer so the turn doesn't wait for playback. |

If afplay fails, a toast says so.

Requirements

  • macOS, because the mod uses afplay and the macOS system sounds.

更多类似作品