diff options
author | Florian Pritz <bluewind@xinu.at> | 2011-07-10 21:46:09 +0200 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2011-07-10 21:48:01 +0200 |
commit | d2a44efbe707b7210107fabce58fb99c1a3b251e (patch) | |
tree | c5527ba09d85d044326a06393ad8d0f88d8ac167 /irssi_notify.sh | |
parent | 5a311acfe51d396dd65fe72ec478ceebea64f6c1 (diff) | |
download | bin-d2a44efbe707b7210107fabce58fb99c1a3b251e.tar.gz bin-d2a44efbe707b7210107fabce58fb99c1a3b251e.tar.xz |
mass commit
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'irssi_notify.sh')
-rwxr-xr-x | irssi_notify.sh | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/irssi_notify.sh b/irssi_notify.sh index c7281be..de3d387 100755 --- a/irssi_notify.sh +++ b/irssi_notify.sh @@ -1,9 +1,10 @@ #!/bin/bash -#pgrep irssi_notify.sh && exit +[[ -z $DISPLAY ]] && exit 1; -#tail -f $HOME/.irssi/fnotify | -ssh mistral 'inotail -f -n 0 ~/.irssi/fnotify' | +exec 0<&- + +ssh mistral 'tail -f -n0 ~/.irssi/fnotify' | sed -ru " s/&/\&/g; s/</\</g; @@ -11,11 +12,10 @@ ssh mistral 'inotail -f -n 0 ~/.irssi/fnotify' | 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 - if [ "X$heading" != "X" ]; then - ssh mistral 'echo "" > ~/.irssi/fnotify'; - ossplay ~/misc/High_Bee-Public_D-135.wav - notify-send -t 5000 -- "${heading}" "${message}"; - fi + while read heading message; do + if [[ -n $heading ]]; then + ssh mistral 'echo "" > ~/.irssi/fnotify'; + ossplay ~/misc/High_Bee-Public_D-135.wav + notify-send -t 5000 -- "${heading}" "${message}"; + fi done |