- Add reduced_styles config to switch between Tailwind CDN and inline CSS - Restore liquid wave animations in full-styles mode - Add score decrement endpoint and staged hold-to-reset (decrement/arm/reset) - Improve start.sh: prefer .venv, cleanup stale processes, X display fallback - Scope inline utility classes to body.reduced-styles
40 lines
804 B
Bash
Executable File
40 lines
804 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -e
|
|
|
|
cd "$(dirname "$0")"
|
|
|
|
# Clean up previous instances so restarts are safe
|
|
fuser -k 50743/tcp 2>/dev/null || true
|
|
pkill -x chromium 2>/dev/null || true
|
|
pkill -x firefox 2>/dev/null || true
|
|
sleep 1
|
|
|
|
if [ -x ".venv/bin/python3" ]; then
|
|
PYTHON=".venv/bin/python3"
|
|
else
|
|
PYTHON="python3"
|
|
fi
|
|
|
|
"$PYTHON" app.py &
|
|
APP_PID=$!
|
|
|
|
sleep 2
|
|
|
|
BROWSER_FLAGS="--kiosk http://localhost:50743 \
|
|
--enable-gpu-rasterization \
|
|
--ignore-gpu-blocklist \
|
|
--no-first-run \
|
|
--no-default-browser-check \
|
|
--disable-dev-shm-usage \
|
|
--disable-infobars"
|
|
|
|
if command -v chromium >/dev/null 2>&1; then
|
|
export DISPLAY="${DISPLAY:-:0}"
|
|
export XAUTHORITY="${XAUTHORITY:-$HOME/.Xauthority}"
|
|
chromium $BROWSER_FLAGS &
|
|
else
|
|
firefox --kiosk http://localhost:50743 &
|
|
fi
|
|
|
|
wait $APP_PID
|