So yeah, is there any way to do this? I was thinking of something similar to gaim's "sound command" setting. Of course, it doesn't really have to have anything to do with sound at all (which is the point, actually).