My favorites | Sign in
Project Logo
                
Search
for
Updated Feb 07, 2007 by stickster
Labels: Featured, Phase-Deploy, Phase-Implementation
MainPage  
Scratchpad for irssi-libnotify

Quick Start

Features

This script pops up libnotify-style balloons on the desktop to let a GUI user know something is going on in an Irssi session. The following types of messages produce notifications:

  • private message
  • highlighted public message
  • DCC request

Requirements

  • irssi (0.8+ ?)
  • libnotify
  • Optional: screen

A Fedora Core 5 or 6 box will provide the appropriate version of libnotify, but you may need to install irssi (and optionally screen).

Download

You can download the plugin here or at http://irssi-libnotify.googlecode.com/svn/trunk/notify.pl.

Details

How It Works

A lot of people run a permanently-connected Linux box, usually on a broadband connection. You can run screen on that system, which decouples the console from the particular terminal where you logged in. (Basically, it means you can disconnect the screen session, log out, log in later or from somewhere else, and reconnect right back where you left off.) screen gives you multiple windows much like a GUI, although of course it's much faster and less resource-intensive, so you can even run it on your home server's 300 MHz CPU.

Think of the power: You run a screen session on your permanent system, and irssi in a window. Even if you leave home or work, and want to keep logging or know if someone tried to reach you while you were away, you now have that capability.

Just ssh to your desired "permanent" chat box, and run screen. Then you can start irssi in a screen window. Note that you must have libnotify on the chat box itself.

See http://irssi.org/documentation for more on using screen. If you're in screen, hit Ctrl+A ? to see online help, or man screen of course.

The plugin is simple to use; copy it to ~/.irssi/scripts and then run irssi. Then in irssi, run

/LOAD perl
/SCRIPT LOAD notify.pl

If you want this to load automatically, an easy way to do that is:

mkdir ~/.irssi/scripts/autorun
cd ~/.irssi/scripts/autorun
ln -s ../notify.pl

To test, have someone shout at you (using your name in a channel), or send a private message to your nick with /MSG.

Known Bugs/Problems

Seems to work fine with SSH + screen, as most people prefer to use irssi from what I gather. You need to have X forwarded on the SSH session, of course! (Use ssh -X to forward X traffic over the session.)

The notifications stick to the current session, so if you detach from screen and reattach from another host, you will need to reload the script:

/UNLOAD perl
/LOAD perl
/SCRIPT LOAD notify.pl   # not needed if you autoload

ToDo

  • Find a nice systematic function for making messages entity-safe
  • Add a reload option
  • Limiter in case of channel flood
  • ? (Add something)
  • Have a way of sending back a one-liner from the notification

Sign in to add a comment
Hosted by Google Code