Skip to content

Instantly share code, notes, and snippets.

@eni23
Created August 3, 2015 19:51
Show Gist options
  • Save eni23/1d9b49fad56b042d88d1 to your computer and use it in GitHub Desktop.
Save eni23/1d9b49fad56b042d88d1 to your computer and use it in GitHub Desktop.
#!/bin/bash
IFACE=org.freedesktop.Notifications
MEMBER=Notify
dbus-monitor --monitor "interface='$IFACE',member='$MEMBER'" |
while read -r line; do
if [ "$(echo $line | grep 'mail-notification')" ]; then
blinkstick --pulse --set-color='#00ff00' --duration=1000
fi
if [ "$(echo $line | grep 'notify-send')" ]; then
blinkstick --pulse --set-color='#0040ff' --duration=100
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment