#!/bin/bash

CONFIG_PATH=${HOME}/.config/kylin-wine
if [[ ! -d ${CONFIG_PATH} ]];then
    mkdir ${CONFIG_PATH}
    echo 0 > ${CONFIG_PATH}/enable_wine_start_helper
fi
TEXT=""
enable_start_helper=$(cat ${CONFIG_PATH}/enable_wine_start_helper)
if [[ $enable_start_helper == "0" ]];then
    TEXT="是否开启wine辅助启动程序?"
    zenity --question --title="wine-start-helper" --text=${TEXT} --width=200 --no-wrap
    if [[ $? == 0 ]];then
        echo 1 > ${CONFIG_PATH}/enable_wine_start_helper
    fi
else
    TEXT="是否关闭wine辅助启动程序?"
    zenity --question --title="wine-start-helper" --text=${TEXT} --width=200 --no-wrap
    if [[ $? == 0 ]];then
        echo 0 > ${CONFIG_PATH}/enable_wine_start_helper
    fi
fi
#echo ${CONFIG_PATH}/enable_wine_start_helper

