1.) Download script fnotify.pl to ~/.irssi/scripts/fnotify.pl and make symbolic link to .irssi/scripts/autorun (ln -s ~/.irssi/scripts/fnotify.pl ~/.irssi/scripts/autorun/fnotify.pl [to automatic start script after new irssi start])
- manually you can load this script in irssi by /load fnotify
this script will generate file ~/.irssi/fnotify with messages for you, or highlighted messages (command /hilight in irssi)
2. Now we need some local script which will check file ~/.irssi/fnotify on remote server and display popup message, something like this:
#!/bin/bash
ssh username@host ": > .irssi/fnotify ; tail -f .irssi/fnotify " |
sed -u 's/[<@&]//g' | while read heading message; do /usr/bin/notify-send -u critical -i /usr/share/icons/gnome/scalable/apps/im-yahoo.svg -t 3000 -- "${heading}" "${message}"; done
You can also put this script in automatic started services (System -> Preferences -> Sessions)
Žiadne komentáre:
Zverejnenie komentára