#!/bin/sh
# The touch dock widget (docs/project-plan.md Phase 16). Identical apt-first/
# documented-placeholder pattern as hosts/thin-client's 0800-eww-widget.hook.chroot —
# eww is not in Debian bookworm main (a Rust binary, normally cargo-built or fetched
# as a GitHub release).
set -eu

if apt-get install -y --no-install-recommends eww 2>/dev/null; then
  echo "0500-eww-dock: installed eww from apt."
else
  echo "0500-eww-dock: eww is not available from the configured apt sources."
  echo "  The touch dock (the on-screen Spotify/Home/Web/Keyboard bar) will not appear"
  echo "  on this image until eww is installed:"
  echo "    a) cargo install eww (needs a Rust toolchain in a build hook), or"
  echo "    b) fetch a release binary from https://github.com/elkowar/eww/releases"
  echo "       (check the current tag yourself) into /usr/local/bin/eww."
  echo "  Without it there is NO on-screen app switcher — the panel still boots and"
  echo "  shows Home, but touch navigation between apps needs the dock. Home Assistant/"
  echo "  MQTT app switching (touchpanel_agent) still works either way."
fi
