CAVA runs in background via cava-start.sh, writing bar values to /tmp/skeledance_bars. A new QML DataSource polls that file at 80ms and calls updateBars() in JS. Falls back to rest state when not playing. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
9 lines
286 B
Bash
Executable file
9 lines
286 B
Bash
Executable file
#!/usr/bin/env bash
|
|
# Kill any previous instance tied to this config
|
|
pkill -f "cava -p.*skeledance" 2>/dev/null
|
|
sleep 0.2
|
|
|
|
CONF="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/cava.conf"
|
|
cava -p "$CONF" | while IFS= read -r line; do
|
|
printf '%s\n' "$line" > /tmp/skeledance_bars
|
|
done
|