Cute beeps for your terminal
I think computers should beep. Put this in ~/.local/bin/bip if you agree:
#/usr/bin/bash
notes=()
times=()
t=0
for arg in $@; do
if [[ $arg != 0 ]]; then
notes+=(sine $arg)
times+=(${t}s)
fi
t=$((t + 3500))
done
play -qn -c1 synth 1 ${notes[*]} \
fade 0.01 0.1 0.06 delay ${times[*]} gain -20
The play command is provided by sox.
Now you can run long_command && bip C4 D4 G4, for example. I use it in my .claude/settings.json to have Claude chirp at me, with different little melodies depending on what it wants.
{
"hooks": {
"Stop": [
{
"hooks": [ { "type": "command", "command": "bip D5 F4" } ]
}
],
"Notification": [
{
"matcher": "permission_prompt",
"hooks": [ { "type": "command", "command": "bip D5 E5" } ]
},
{
"matcher": "idle_prompt",
"hooks": [ { "type": "command", "command": "bip A4 B4 A4" } ]
}
],
"PreToolUse": [
{
"matcher": "AskUserQuestion",
"hooks": [ { "type": "command", "command": "bip D5 E5" } ]
}
]
}
}