2.4.0基本结束

This commit is contained in:
2022-10-24 22:11:03 +08:00
parent 7b83c7ef5f
commit 59e6da0652
67 changed files with 552 additions and 102 deletions

View File

@@ -101,8 +101,8 @@ if __name__ == "__main__":
ui.delectButton.clicked.connect(Click.DeleteButton)
ui.startServer.triggered.connect(lambda: threading.Thread(target=os.system, args=[f"nohup '{programPath}/key-get.py' &"]).start())
ui.stopServer.triggered.connect(lambda: threading.Thread(target=os.system, args=[f"'{programPath}/stop.sh'"]).start())
ui.setAutoStart.triggered.connect(lambda: threading.Thread(target=os.system, args=[f"'{programPath}/start-auto-server.sh'"]).start())
ui.setUnautoStart.triggered.connect(lambda: threading.Thread(target=os.system, args=[f"'{programPath}/stop-auto-server.sh'"]).start())
ui.setAutoStart.triggered.connect(lambda: threading.Thread(target=os.system, args=[f"pkexec '{programPath}/start-auto-server.sh'"]).start())
ui.setUnautoStart.triggered.connect(lambda: threading.Thread(target=os.system, args=[f"pkexec '{programPath}/stop-auto-server.sh'"]).start())
window.show()
threading.Thread(target=Check.CheckThreading).start()
Clear()

View File

@@ -91,11 +91,11 @@ def Read():
time.sleep(0.01)
# Lock 锁防止多次调用
if os.path.exists("/tmp/deepin-wine-runner-keyboard-lock"):
print("不可多次调用")
print("锁 /tmp/deepin-wine-runner-keyboard-lock 已存在")
sys.exit(1)
os.mknod("/tmp/deepin-wine-runner-keyboard-lock")
#if os.path.exists("/tmp/deepin-wine-runner-keyboard-lock"):
# print("不可多次调用")
# print("锁 /tmp/deepin-wine-runner-keyboard-lock 已存在")
# sys.exit(1)
#os.mknod("/tmp/deepin-wine-runner-keyboard-lock")
threading.Thread(target=Read).start()
with keyboard.Listener(
on_press=on_press,

View File

@@ -22,7 +22,7 @@ class Check:
try:
bus = dbus.SessionBus()
bus.get_object("com.deepin.daemon.Keybinding", "/com/deepin/daemon/Keybinding").List()
int("a")
#int("a")
return True
except:
print("无法检测到 Deepin/UOS 快捷键服务")

View File

@@ -1 +1 @@
[]
[]

View File

@@ -7,6 +7,7 @@
# 感谢:感谢 wine、deepin-wine 以及星火团队,提供了 wine、deepin-wine、spark-wine-devel 给大家使用,让我能做这个程序
# 基于 Bash 制作
#################################################################################################################
cd `dirname $0`
programPath=$(cd "$(dirname "$0")";pwd)
echo $programPath
if [[ -f "/etc/xdg/autostart/deepin-wine-runner-keyboard.desktop" ]]; then

View File

@@ -8,6 +8,7 @@
# 基于 Bash 制作
#################################################################################################################
programPath=$(cd "$(dirname "$0")";pwd)
cd `dirname $0`
echo $programPath
if [[ ! -f "/etc/xdg/autostart/deepin-wine-runner-keyboard.desktop" ]]; then
# 判断是否自启动,已经自启动就不再考虑