心平气和
deepin
2021-12-31 09:20 可以通过监听 手机微信的文件来实现通知
#!/bin/bash
file="/data/uengine/data/data/data/com.tencent.mm/shared_prefs/"
inotifywait -mq -e modify $file | while read event
do
if [[ "$event" == *notify_sync_pref.xml ]];then
notify-send -i '/home/tensor/Documents/notify/mm.jpg' ‘主银’ ‘你有微信消息哦~~’
fi
done
注意:
- notify-send -i 后面 替换成你自己的图片地址
- 将/data/uengine/data/data/data/com.tencent.mm/shared_prefs/ 设为当前用户可读写的权限
- 需要安装 inotify-tools 安装命令 sudo apt install inotify-tools
效果展示:

Reply Like 1 View the author


中文 
如题,我在deepin上安装的微信、QQ等应用,如何设置才能在收到消息后,能在系统收到通知?