summaryrefslogtreecommitdiffstats
path: root/irssi_notify.sh
diff options
context:
space:
mode:
Diffstat (limited to 'irssi_notify.sh')
-rwxr-xr-xirssi_notify.sh16
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/</\&lt;/g;
+ s/>/\&gt;/g;
+ s%(#[a-zA-Z]+ )&lt;([^>]{0,10})&gt;%\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