Created
March 27, 2013 15:07
-
-
Save bdimcheff/5254934 to your computer and use it in GitHub Desktop.
pidgin notifier
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
#!/bin/bash | |
DIR=`dirname $0` | |
$DIR/pidgin_notifier.py | grep -v --line-buffered "^Brandon Dimcheff" | grep -i --line-buffered "\(brandon\)\|\(bdimchef\)\|\(@all\)" | while read line;do notify-send -- "Mentioned in HipChat" "${line}";done |
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
#!/bin/bash | |
if ps -ef | grep -v grep | grep "notifier.sh" ; then | |
exit 0 | |
else | |
/home/bdimchef/Documents/Olark/bin/notifier.sh > /dev/null & | |
fi |
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/env python2.7 | |
import sys | |
def my_func(account, sender, message, conversation, flags): | |
print sender.encode('utf-8'), u":", message.encode('utf-8') | |
sys.stdout.flush() | |
import dbus, gobject | |
from dbus.mainloop.glib import DBusGMainLoop | |
dbus.mainloop.glib.DBusGMainLoop(set_as_default=True) | |
bus = dbus.SessionBus() | |
bus.add_signal_receiver(my_func, | |
dbus_interface="im.pidgin.purple.PurpleInterface", | |
signal_name="ReceivedChatMsg") | |
loop = gobject.MainLoop() | |
loop.run() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
open
gnome-session-properties
and add a thing that executesnotifier_watchdog.sh