mirror of
https://github.com/kuhyx/screen-locker.git
synced 2026-11-12 08:30:54 +01:00
dopamine-ux 05: selectionClick on recording a set or warmup, mediumImpact + generated chime (music_theory, pinned tag) on finish, dialog arrival on the slow motion token, AppDuration / AppCurve in theme.dart, streak card counts up, all of it collapsing under the OS reduced-motion flag. One Settings "Sound" switch silences the chime and the break-end cue (foreground service included, via a silent channel); haptics stay. Removes the finished dopamine-ux-05 prompt. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WzxdWYdwRAtMg7ki6TKxuU
34 lines
1.1 KiB
Bash
Executable File
34 lines
1.1 KiB
Bash
Executable File
#!/bin/bash
|
|
# Render assets/sounds/workout_done.wav (the finish-workout chime) from
|
|
# render_finish_chime.py with the PINNED music_theory toolkit, and rebuild
|
|
# its MANIFEST.json (recipe, toolkit version, SHA-256) from scratch.
|
|
#
|
|
# The pin matters: a moving toolkit HEAD would silently change the sound the
|
|
# user listened to. Re-running must reproduce the shipped bytes.
|
|
#
|
|
# Usage: tools/render_finish_chime.sh [output_dir]
|
|
# Requires: python3 (with venv), network access to github.com.
|
|
set -euo pipefail
|
|
|
|
readonly TOOLS_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
readonly TOOLKIT_SPEC="music_theory @ git+https://github.com/kuhyx/utils@music-theory-v0.1.0#subdirectory=music_theory"
|
|
readonly OUT_DIR="${1:-${TOOLS_DIR}/../assets/sounds}"
|
|
WORK_DIR=""
|
|
|
|
cleanup() {
|
|
if [[ -n "$WORK_DIR" && -d "$WORK_DIR" ]]; then
|
|
rm -rf "$WORK_DIR"
|
|
fi
|
|
}
|
|
trap cleanup EXIT
|
|
|
|
main() {
|
|
command -v python3 >/dev/null || { echo "Error: python3 is required" >&2; exit 1; }
|
|
WORK_DIR="$(mktemp -d)"
|
|
python3 -m venv "${WORK_DIR}/venv"
|
|
"${WORK_DIR}/venv/bin/pip" install --quiet "$TOOLKIT_SPEC"
|
|
"${WORK_DIR}/venv/bin/python" "${TOOLS_DIR}/render_finish_chime.py" "$OUT_DIR"
|
|
}
|
|
|
|
main "$@"
|