WeChat-3.0.0.57 2.9.5.41deepin7 无法使用 run.sh 来弹窗
amosbird opened this issue · comments
当误触 ESC 关闭了当前的 WeChat 窗口后,使用 run.sh 会拉起一个新的 WeChat。早先版本能够直接唤出已运行的 WeChat 窗口。
是的 有时候状态栏卡死 双击无法唤醒微信的时候 使用run.sh就直接打开新的微信登录窗口了
请问这个 ctrl+alt+w 的 wine wechat 热键在哪儿配置呢?
编辑-新建-全局快捷键-命令/URL
这是什么软件呢? DE 带的吗?
这个kde的系统设置啊。别的桌面的话可以百度一下 怎么添加全局快捷键
ok,我理解错了,原来在 wechat 里配置好热键即可,谢谢指出 .deepinwine/deepin-wine-helper/sendkeys.sh
找不到$HOME/.deepinwine/deepin-wine-helper/sendkeys.sh的用/opt/deepinwine/tools/sendkeys.sh代替也可以
扒了一遍 /opt/deepinwine/tools/sendkeys.sh
, 这个脚本里写的非常臃肿且低效,还有一些语法问题,通过这个脚本来唤醒WeChat可以通过这个命令:
/opt/deepinwine/tools/sendkeys.sh w wechat 4
但是执行时可以看到有非常多的 warning log, 其实这个脚本的最终目的是执行这个命令:
env WINEPREDLL=/opt/apps/com.qq.weixin.deepin/files/dlls WINEDLLPATH=/opt/deepin-wine6-stable/lib:/opt/deepin-wine6-stable/lib64 WINEPREFIX=/home/hyleon/.deepinwine/Deepin-WeChat deepin-wine6-stable /opt/deepinwine/tools/sendkeys.exe w
我的方案:
1. 新建脚本文件
/home/{your_name}/scripts/weakup_wechat.sh
#!/usr/bin/env bash
env WINEPREDLL=/opt/apps/com.qq.weixin.deepin/files/dlls WINEDLLPATH=/opt/deepin-wine6-stable/lib:/opt/deepin-wine6-stable/lib64 WINEPREFIX=/home/hyleon/.deepinwine/Deepin-WeChat deepin-wine6-stable /opt/deepinwine/tools/sendkeys.exe w
(其实这个命令可以精简,env 里并不需要给出那么多,只执行
env WINEPREFIX=/home/hyleon/.deepinwine/Deepin-WeChat deepin-wine6-stable /opt/deepinwine/tools/sendkeys.exe w
效果是一样的)
2. 添加执行权限
chmod +x /home/{your_name}/scripts/weakup_wechat.sh
3. 映射快捷键
具体的 DE or WM 配置方法不同,我使用的是 BSPWM + sxhkd, 所以以 sxhkd 配置快捷键为例:
/home/{your_name}/.config/sxhkd/sxhkdrc
# WeChat
ctrl + alt + w
/home/{your_name}/scripts/weakup_wechat.sh
然后就可以通过你配置的快捷键(如我配置的是 Ctrl + Alt + w
)来唤醒 WeChat 了
(注:配置好快捷键后,根据不用的 DE or WM, 可能需要一些额外的操作来使配置生效,如 sxhkd 可以通过 super + Escape
来 kill 掉 sxhkd 进程来使配置生效)