add-banner

This commit is contained in:
2024-05-06 09:33:32 +08:00
parent 933497abcf
commit 0705e9c9ab
4 changed files with 143 additions and 2 deletions
@@ -1,4 +1,17 @@
#!/bin/bash
##### 若有pybanner则尝试启动
if [ -e /opt/durapps/spark-dwine-helper/pybanner/pybanner.py ];then
echo "Protocol upgrade: Trying to activate python banner..."
python3 /opt/durapps/spark-dwine-helper/pybanner/pybanner.py
if [ "$?" = "0" ];then
exit
else
echo "Failed to activate. Fallback to normal zenity."
fi
fi
if [ ! -z "$WAYLAND_DISPLAY" ]; then
echo "Wayland detected. Do not check wmclass"
zenity --progress --title="星火Windows应用兼容助手" --text="正在为您启动以下应用:$WINE_APP_NAME" --pulsate --width=400 --auto-close --no-cancel --timeout=3
@@ -41,4 +54,4 @@ while true; do
done
}
check_wmclass | zenity --progress --title="星火Windows应用兼容助手" --text="正在为您启动以下应用:$WINE_APP_NAME" --pulsate --width=400 --auto-close --no-cancel --timeout=10
check_wmclass | zenity --progress --title="星火Windows应用兼容助手" --text="正在为您启动以下应用:$WINE_APP_NAME" --pulsate --width=400 --auto-close --no-cancel --timeout=20