Skip to content
This repository has been archived by the owner on Oct 2, 2019. It is now read-only.

Commit

Permalink
Kill off session on the irssi instance too.
Browse files Browse the repository at this point in the history
  • Loading branch information
jk0 committed Oct 17, 2011
1 parent ea566ca commit 1ce2a57
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 1 deletion.
4 changes: 4 additions & 0 deletions README
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -26,3 +26,7 @@ Notifier Installation
- Set 'Hostname' to your irssi instance's host - Set 'Hostname' to your irssi instance's host
- Set your irssi instance's username and host for LocalCommand - Set your irssi instance's username and host for LocalCommand
- Ensure the path to notify.sh is valid - Ensure the path to notify.sh is valid

vim ~/src/irssi-growl/notify.sh

- Ensure the path to irssi-growl.sh is valid
22 changes: 22 additions & 0 deletions irssi-growl.sh
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash

# Copyright 2011 Josh Kearney
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

ps ax | awk '{if($0 ~ /.irssi\/growl/ && $1 ~ /[0-9]+/ && $4 !~ /awk/) print $1}' |
while read pid; do
kill $pid
done

tail -f .irssi/growl
2 changes: 1 addition & 1 deletion notify.sh
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ while read pid; do
kill $pid kill $pid
done done


(ssh $1 -o PermitLocalCommand=no ": > .irssi/growl; tail -f .irssi/growl" | (ssh $1 -o PermitLocalCommand=no "~/src/irssi-growl/irssi-growl.sh" |
while read network message; do while read network message; do
growlnotify -t "${network}" -m "${message}"; growlnotify -t "${network}" -m "${message}";
done)& done)&

0 comments on commit 1ce2a57

Please sign in to comment.