#!/bin/bash # Your remote host remote_user=`whoami` remote_host='remote.system.somewhere' # Growl notifications (Mac OS X) growl_mesg='/usr/local/bin/growlnotify' # Libnotify notifications (Linux) libnotify_mesg='/usr/bin/notify-send' if [ $# -eq 1 ]; then remote_host="$1" fi (ssh $remote_user@"$remote_host" -o PermitLocalCommand=no \ ": > .irssi/fnotify ; tail -f .irssi/fnotify " | \ while read heading message; do \ if [ -x $libnotify_mesg ]; then \ $libnotify_mesg -t 4000 -c im.received -i info -u low "$heading: $message";\ fi; \ if [ -x $growl_mesg ]; then \ $growl_mesg -t "$heading" -m "$message"; \ fi; \ done)&