mirror of
https://github.com/theniceboy/.config.git
synced 2025-12-26 14:44:57 +08:00
cc ring mode
This commit is contained in:
parent
0487e8b3ba
commit
647b3a1f1b
2 changed files with 33 additions and 2 deletions
|
|
@ -8,15 +8,18 @@
|
||||||
"hooks": [
|
"hooks": [
|
||||||
{
|
{
|
||||||
"type": "command",
|
"type": "command",
|
||||||
"command": "voice_flag=\"$HOME/.claude/voice-enabled\"; if [ -f \"$voice_flag\" ]; then transcript_path=$(cat | jq -r '.transcript_path'); pkill -f 'say' 2>/dev/null; nohup bash -c 'tail -1 \"'$transcript_path'\" | jq -r \".message.content[0].text // empty\" | say' >/dev/null 2>&1 & fi"
|
"command": "voice_flag=\"$HOME/.claude/voice-enabled\"; ring_flag=\"$HOME/.claude/ring-enabled\"; if [ -f \"$ring_flag\" ]; then pkill -f 'say' 2>/dev/null; nohup bash -c 'say \"Claude Code Done\"' >/dev/null 2>&1 & elif [ -f \"$voice_flag\" ]; then transcript_path=$(cat | jq -r '.transcript_path'); pkill -f 'say' 2>/dev/null; nohup bash -c 'tail -1 \"'$transcript_path'\" | jq -r \".message.content[0].text // empty\" | say' >/dev/null 2>&1 & fi"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
},
|
||||||
"statusLine": {
|
"statusLine": {
|
||||||
"type": "command",
|
"type": "command",
|
||||||
"command": "bunx -y ccstatusline@latest",
|
"command": "bunx -y ccstatusline@latest",
|
||||||
"padding": 0
|
"padding": 0
|
||||||
},
|
},
|
||||||
|
"env": {
|
||||||
|
"DISABLE_AUTOUPDATER": "1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
28
raycast-scripts/claude-code-ring-toggle.sh
Executable file
28
raycast-scripts/claude-code-ring-toggle.sh
Executable file
|
|
@ -0,0 +1,28 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Required parameters:
|
||||||
|
# @raycast.schemaVersion 1
|
||||||
|
# @raycast.title Toggle Claude Ring Mode
|
||||||
|
# @raycast.mode compact
|
||||||
|
|
||||||
|
# Optional parameters:
|
||||||
|
# @raycast.icon 🔔
|
||||||
|
# @raycast.description Toggle Claude Code ring mode on/off (plays "Claude Code Done" sound)
|
||||||
|
|
||||||
|
ring_flag="$HOME/.claude/ring-enabled"
|
||||||
|
voice_flag="$HOME/.claude/voice-enabled"
|
||||||
|
|
||||||
|
if [ -f "$ring_flag" ]; then
|
||||||
|
# Ring mode is currently on, turn it off
|
||||||
|
rm -f "$ring_flag"
|
||||||
|
pkill -f 'say' 2>/dev/null
|
||||||
|
echo "Claude Ring Mode OFF"
|
||||||
|
else
|
||||||
|
# Ring mode is currently off, turn it on
|
||||||
|
# First disable voice mode if it's enabled
|
||||||
|
if [ -f "$voice_flag" ]; then
|
||||||
|
rm -f "$voice_flag"
|
||||||
|
fi
|
||||||
|
touch "$ring_flag"
|
||||||
|
echo "Claude Ring Mode ON (Voice Mode disabled)"
|
||||||
|
fi
|
||||||
Loading…
Add table
Add a link
Reference in a new issue