#!/bin/sh
# LightGUI Rust Flatpak launcher — start the designer.
# The canvas lives inside the designer now (no separate layout
# process); the XFrame palette is a separate crate but is not
# launched — palette selection happens in-process in the designer.
# Binaries and icons live under /app/share/lightgui-rust/.
ROOT=/app/share/lightgui-rust
export LIGHTGUI_ICONS="$ROOT/widgets/icons"

if [ -z "$DISPLAY" ] && [ -z "$WAYLAND_DISPLAY" ]; then
  echo "lightgui-rust: no display (DISPLAY and WAYLAND_DISPLAY are unset)." >&2
  exit 1
fi

exec "$ROOT/lightgui-designer" "$@"
