growl/libnotify notifications for remote irssi (w/ fnotify)

This commit is contained in:
James Walker 2011-11-12 21:45:53 -05:00
parent 1bea7059b6
commit 55b9b72fb4
2 changed files with 23 additions and 0 deletions

18
bin/ircnotify.sh Executable file
View File

@ -0,0 +1,18 @@
#!/bin/zsh
notify()
{
heading=$1
message=$2
if [ `uname` = "Darwin" ]; then
growlnotify -t ${heading} -m ${message}
else
notify-send ${heading} ${message}
fi
}
(ssh irc.walkah.net -o PermitLocalCommand=no \
": > .irssi/fnotify ; tail -f .irssi/fnotify " | \
while read heading message; do \
notify "${heading}" "${message}"; \
done)&

View File

@ -1,2 +1,7 @@
GatewayPorts yes
HashKnownHosts no
Host irc.walkah.net
Hostname irc.walkah.net
LocalCommand ~/bin/ircnotify.sh
PermitLocalCommand yes