My version of libnotify-irssi
You know you hit some weird geekish corner when the "howtos" you find are all different blogs proposing the same thing (yes, that is seven different blog posts, because I stopped at the first page on Google). The worst thing is that all of those use their own weird and funky way to implement a very simple thing: a GUI-thing-popup-when-someone-pings-you-on-IRC and all I needed was nothing that complex: just a simple plugin that pops up a window. No SSH tunnel, no python package, no special configuration other than what I'll detail here.
The trick is, of course, that I already have a setup that's friendly to that. I already had configured my local laptop irssi to talk to my always running irssi through a proxy. That is setup like this:
- follow the documentation to configure the "client" and "server" irssi
- use this brilliantWtrivial script to startup irssi:
#! /bin/sh cd $HOME if [ -e .irssitunnel.pid ] && pidof `cat .irssitunnel.pid`; then echo "tunnel already started, pid: " `cat .irssitunnel.pid` else if [ -e .irssitunnel.pid ] ; then rm -f .irssitunnel.pid echo "removing stale lockfile" fi cmd="ssh -a -f -L 7777:localhost:7777 -L 7778:localhost:7778 -L 7779:localhost:7779 -NT anarcat.ath.cx" # can't use & because then we don't get the password prompt fast enough $cmd # can't rely on $! because ssh backgrounds by itself pid=`ps ax | grep "$cmd" | grep -v grep | awk '{print $1}'` if [ "$pid" -gt 0 ] ; then echo $pid > .irssitunnel.pid else echo "cannot start tunnel, aborting" exit 1 fi fi irssi --config=.irssi/config.proxy tunnel=`cat .irssitunnel.pid` echo "closing tunnel: $tunnel" kill $tunnel && rm .irssitunnel.pid
This is the hard part, admittedly, but it's not the point of the post. The point of the post is the stupidly easy part:
cd .irssi/scripts wget http://irssi-libnotify.googlecode.com/svn/trunk/notify.pl ln -s ../notify.pl autorun/ wget http://irssinotifier.ufsoft.org/export/102/trunk/irssinotifier/data/irssi_mini.png # optional cd ./irssi_proxy # the script above, also optional, you could just use irssi locally /load perl /script load notify /set notify_icon /home/anarcat/.irssi/scripts/irssi_mini.png # optional (yes, need the full freaking path) /msg anarcat test # should "just work"
And voilà. Got notifications running. So now on IRC, you can really piss me off by filling the screen with crap.
effectivement, il manque l'autorun, bonne remarque.
autrement je peux faire remarquer que j'utilise encore le truc, mais en plus maintenant j'ai bitlbee de configuré dans mon setup ce qui fait que j'ai aussi mon IM qui apparaît au travers...
another option: http://pthree.org/2007/03/21/irssi-gui-notify/
i documented this here: https://wiki.koumbit.net/Irssi
but of course i didn't find this page until after i had figure it out myself