#!/usr/bin/env bash
# USAGE: "nheko default" for the default profile or whatever profile is
# desired.

set -x

if [ -f "$HOME/.local/bin/_a-usrlocalbin-functions.bash" ]; then
	. $HOME/.local/bin/_a-usrlocalbin-functions.bash
elif [ -f /usr/local/bin/_a-usrlocalbin-functions.bash ]; then
	. /usr/local/bin/_a-usrlocalbin-functions.bash
else
	echo "Library _a-usrlocalbin-functions.bash not found."
	exit 1
fi

if [[ "$1" == -* ]]; then
	_gigaramhalfcpu flatpak run --env=LANGUAGE=fi:eo:en im.nheko.Nheko//master "$@"
else
	_gigaramhalfcpu flatpak run --env=LANGUAGE=fi:eo:en im.nheko.Nheko//master --compact --profile "$@"
fi
set +x
