#!/usr/bin/env bash
set -e
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
cd "$DIR"

if [ -z "$DISPLAY" ] && [ -z "$WAYLAND_DISPLAY" ]; then
    if [ -e "/tmp/.X11-unix/X0" ]; then export DISPLAY=":0";
    elif [ -e "/tmp/.X11-unix/X1" ]; then export DISPLAY=":1"; fi
fi

exec python3 -m client.app "$@"
