diff options
Diffstat (limited to 'irssi_notify.sh')
-rwxr-xr-x | irssi_notify.sh | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/irssi_notify.sh b/irssi_notify.sh new file mode 100755 index 0000000..67ec454 --- /dev/null +++ b/irssi_notify.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +#tail -f $HOME/.irssi/fnotify | +ssh mistral 'tail -f ~/.irssi/fnotify' | + sed -ru " + s/&/\&/g; + s/</\</g; + s/>/\>/g; + s%(#[a-zA-Z]+ )<([^>]{0,10})>%\1<b>\2</b> %g + s%(https?://[^ ]+\.[a-zA-Z]{1,3})%<a href=\"\1\">\1</a>%g; + s%([a-zA-Z0-9+_-]+@[^ ]+\.[a-zA-Z]{1,3})%<a href=\"mailto:\1\">\1</a>%g;" | + while read heading message + do + echo "" > $HOME/.irssi/fnotify ; + notify-send -t 5000 -- "${heading}" "${message}"; + done |