Created
March 22, 2021 07:27
-
-
Save yangon99/8d2a232789e20a67714c560c7865220e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/bash | |
# Refer: http://www.baozy.com/archives/12084.html | |
msg_file=$HOME/Music/sp/msg.wav | |
icon_file=/usr/share/icons/hicolor/16x16/apps/com.qq.im.deepin.svg | |
inotifywait -mq $msg_file --format %e -e OPEN |while read event | |
do | |
notify-send "There's new message from QQ" \ | |
"Just someone opened $msg_file" \ | |
-i $icon_file \ | |
-h string:desktop-entry:"QQ" \ | |
-a "QQ" \ | |
-t 10000 | |
echo ${event} | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment