#!/bin/bash

export QT_QPA_PLATFORM=xcb

USER_APPLAUNCHER_DIR="$HOME/.local/share/Network Optix/applauncher/default"

if [ -x "$USER_APPLAUNCHER_DIR/bin/applauncher-bin" ]
then
    APPLAUNCHER_DIR="$USER_APPLAUNCHER_DIR/bin"
else
    APPLAUNCHER_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
    if [ ! -x "$APPLAUNCHER_DIR/applauncher-bin" ]
    then
        echo "Error: applauncher-bin is not found."
        exit 1
    fi
fi

"$APPLAUNCHER_DIR/applauncher-bin" $@
