#!/bin/bash

voicefile=/usr/share/sounds/sound-icons/cembalo-6.wav

if [ ! -f $voicefile ];then
    echo "声音文件不存在"
    exit 0
fi

dbus-monitor 'type=method_call, interface=org.freedesktop.Notifications, member=Notify' | grep --line-buffered -E '^\s*string "QQ|Icalingua\+\+"$' | while read test; do paplay $voicefile;done

标签: none

添加新评论