支持调用GXDE的deepin-terminal-gtk

This commit is contained in:
2024-07-15 12:52:51 +08:00
parent f9e9a4eb72
commit 18ce8a080f
3 changed files with 12 additions and 1 deletions

View File

@@ -14,12 +14,14 @@ programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
terminal = ""
terminalList = [
"deepin-terminal",
"deepin-terminal-gtk",
"mate-terminal",
"gnome-terminal",
"xfce4-terminal"
]
terminalEnd = {
f"{programPath}/../launch.sh\" \"deepin-terminal": ["-e", 0],
f"{programPath}/../launch.sh\" \"deepin-terminal-gtk": ["-e", 0],
"mate-terminal": ["-e", 1],
"gnome-terminal": ["--", 0],
"xfce4-terminal": ["-e", 1]
@@ -28,6 +30,8 @@ for i in terminalList:
if not os.system(f"which {i}"):
if i == "deepin-terminal":
i = f"{programPath}/../launch.sh\" \"deepin-terminal"
if i == "deepin-terminal-gtk":
i = f"{programPath}/../launch.sh\" \"deepin-terminal-gtk"
terminal = i
break
if terminal == "":