I often forget to start Pidgin when I first sit down at the computer, because I’m usually entrenched in thinking about whatever task brought me there in the first place. Setting up Pidgin to run automatically at login might at first appear to be a good solution to this, but there are times when I don’t want to sign in to instant messaging, such as in the middle of class.
The solution? A gentle reminder at login.
# Adapted from test-multi-actions.py in python-notify
if __name__ == '__main__':
if not pynotify.init("Start Pidgin"):
icon = "file:///usr/share/icons/hicolor/48x48/apps/pidgin.png"
notification = pynotify.Notification(
"Pidgin is not running. Would you like to start it?",
notification.add_action("start", "Start Pidgin", start)
notification.add_action("ignore", "Ignore", ignore)
if not notification.show():
print "Failed to show notification"