添加功能

This commit is contained in:
2024-05-06 10:48:24 +08:00
parent 1af2d8e446
commit 65d88b222f

View File

@@ -77,7 +77,7 @@ select_app() {
select_non_spark_action(){ select_non_spark_action(){
local app="$1" local app="$1"
local app_name="$2" local app_name="$2"
local options=("在终端中打开" "打开容器目录" "清理并重置容器目录") local options=("在终端中打开" "打开容器目录" "清理并重置容器目录" "更多操作")
local choice=$(zenity --width=800 --height=600 --list --title="选择操作" --text="选择要对$app_name执行的操作" --column="操作" "${options[@]}") local choice=$(zenity --width=800 --height=600 --list --title="选择操作" --text="选择要对$app_name执行的操作" --column="操作" "${options[@]}")
case "$choice" in case "$choice" in
"在终端中打开") "在终端中打开")
@@ -99,14 +99,27 @@ select_non_spark_action(){
rm -rf /home/$(whoami)/.deepinwine/${bottle_name}/* rm -rf /home/$(whoami)/.deepinwine/${bottle_name}/*
zenity --info --width=300 --text="操作已完成请重启Wine应用查看" zenity --info --width=300 --text="操作已完成请重启Wine应用查看"
;; ;;
"更多操作")
if [ -e /usr/bin/deepin-wine-runner ];then
/usr/bin/deepin-wine-runner
elif [ $(command -v spark-store) ];then
spark-store spk://store/tools/spark-deepin-wine-runner
elif [ $(command -v deepin-home-appstore-client) ];then
xdg-open appstore://deepin-home-appstore-client?app_detail_info/spark-deepin-wine-runner
else
xdg-open https://gitee.com/gfdgd-xi/deep-wine-runner/releases
fi
;;
esac esac
} }
# 函数选择星火wine助手操作 # 函数选择星火wine助手操作
select_spark_action() { select_spark_action() {
local app="$1" local app="$1"
local app_name="$2" local app_name="$2"
local options=("在终端中打开" "打开容器目录" "清理并重置容器目录" "修改应用缩放" "修改全局缩放") local options=("在终端中打开" "打开容器目录" "清理并重置容器目录" "修改应用缩放" "修改全局缩放" "更多操作")
local choice=$(zenity --width=800 --height=600 --list --title="选择操作" --text="选择要对$app_name执行的操作" --column="操作" "${options[@]}") local choice=$(zenity --width=800 --height=600 --list --title="选择操作" --text="选择要对$app_name执行的操作" --column="操作" "${options[@]}")
case "$choice" in case "$choice" in
@@ -135,6 +148,17 @@ select_spark_action() {
"修改全局缩放") "修改全局缩放")
select_scale_action "全局" "$app" select_scale_action "全局" "$app"
;; ;;
"更多操作")
if [ -e /usr/bin/deepin-wine-runner ];then
/usr/bin/deepin-wine-runner
elif [ $(command -v spark-store) ];then
spark-store spk://store/tools/spark-deepin-wine-runner
elif [ $(command -v deepin-home-appstore-client) ];then
xdg-open appstore://deepin-home-appstore-client?app_detail_info/spark-deepin-wine-runner
else
xdg-open https://gitee.com/gfdgd-xi/deep-wine-runner/releases
fi
;;
*) *)
;; ;;
esac esac