ours_window.sh 1.1 KB

123456789101112131415161718
  1. #!/bin/bash
  2. # usage: ours_window.sh <scene dir> <seconds> [engine args...]
  3. # runs this engine as a 1920x1080 window on the isolated display :98, next to live WE (we_full.sh), for timing
  4. # comparisons grabbed off the same X server. Same isolation as WE: no desktop Wayland/D-Bus, dead audio sockets.
  5. # vblank_mode=0: Xwayland on :98 presents a vsynced GLX window at 1 Hz (weston's headless output never sends frame
  6. # callbacks for it)
  7. # LWE=<dir with linux-wallpaperengine> picks the build (default: this checkout's build/output)
  8. ulimit -c 0
  9. S=${WE_LIVE_DIR:-$HOME/.local/share/we_live}
  10. LWE=${LWE:-$(cd "$(dirname "$0")/../../.." && pwd)/build/output}
  11. bash "$(dirname "$0")/we_display.sh" >/dev/null || exit 1
  12. SCENE=$1 SECS=$2
  13. shift 2
  14. exec env -u WAYLAND_DISPLAY -u WAYLAND_SOCKET -u DBUS_SESSION_BUS_ADDRESS vblank_mode=0 DISPLAY=:98 \
  15. XDG_SESSION_TYPE=x11 XDG_RUNTIME_DIR=$S/run PULSE_SERVER=unix:$S/run/no-pulse \
  16. PIPEWIRE_REMOTE=$S/run/no-pipewire ALSA_CONFIG_PATH=/dev/null \
  17. timeout "$SECS" "$LWE/linux-wallpaperengine" --silent --window 0x0x1920x1080 \
  18. --assets-dir /workspace/SteamLibrary/steamapps/common/wallpaper_engine/assets "$@" "$SCENE"