#!/bin/bash

cd /opt/itch/
if [ -f /opt/itch/itch-setup ]; then
./itch-setup --prefer-launch --appname itch -- "$@"
else
./kitch
fi

if [ -f ~/.local/share/applications/*itch.desktop ]; then
HIDE=`cat ~/.local/share/applications/*itch.desktop | grep NoDisplay=true`
	if [ "$HIDE" = "" ]; then
		echo "" >> ~/.local/share/applications/*itch.desktop
		echo "NoDisplay=true" >> ~/.local/share/applications/*itch.desktop
	fi
fi

exit 0
