irssi is probably the most popular commandline IRC client out there. It has a well established userbase, lots of plugins and can be extended to support other protocols (XMPP and SILC are documented here).

General configuration

See CommentSeConnecterSurIrc#Avec_irssi.

Tips

Hilighting your nick

Use /hilight -nick your_nick to highlight your nick regardless of where it appears on the line (by default it will be highlighted just at the beginning of a line)

Switching to another window by name or number

When you start having lots of windows, it becomes really interesting to be able to jump directly to another window. To do that, you can use the command "window go <name-or-number>" (abbreviated as "win ..." in the examples below) with either a window name or its number:

/win go 13

/win go LeLutin

/win go #koumbit

The window name is a person's nickname if it's a private chat, or the channel name (including the leading hash sign).

renumbering windows

Yeah, like when you need to connect to some other server after netsplit:

/set windows_auto_renumber off

Protip: if you have window numbers in irssi above 100, you look super 733t.

/window number 666

Ignoring channel noise

You can get rid of join and part messages, making busy channels readable again. See /help ignore for details, or follow the instructions here.

If you don't want to RTFM, just type this: /ignore * JOINS PARTS QUITS MODES NICKS

You can search in your irssi history using ctrl-R like in bash with this script: http://scripts.irssi.org/scripts/history_search.pl

You can also use /lastlog: https://irssi.org/documentation/help/lastlog/

Adding colour to messages

To add colours to things you say in irssi, you can hit Ctrl-C, followed by the color code and then type your message.

The following script will show a popup with colour codes when you hit Ctrl-C so you can know which ones to use: https://scripts.irssi.org/scripts/mirc_colour_popup.pl

UTF-8 Emojis

This is kind of just silly really.. but with this plugin you can show UTF-8 emojis with simple ascii tags like :coffee: and :fire:

https://github.com/cespgoespoop/irssi-emojis

SSL certificate authentication

You can also create a secure certificate to authenticate to NickServ without a password (details)

Graphical popup notifications

anarcat technique: complicated proxy

This allows you to connect transparently to your home server that's already connected to your channels, and to have your local irssi running as if it was on your server, yet still have local popups that show up on your desktop. It's made of two parts, the configuration of the proxy/client and the notification configuration.

Proxy configuration

This is an extension of the official documentation.

Notification configuration

This configures notifications on your desktop.

sudo apt-get install libnotify-bin
cd .irssi/scripts
wget http://irssi-libnotify.googlecode.com/svn/trunk/notify.pl
ln -s ../notify.pl autorun/
wget http://dev.ufsoft.org/projects/irssi-notifier/repository/revisions/master/entry/irssinotifier/data/irssi_mini.png # optional

In irssi:

/load perl
/script load notify
/set notify_icon /home/anarcat/.irssi/scripts/irssi_mini.png # optional (yes, need the full freaking path)
/save
/msg anarcat test # should "just work"

Regular workflow

When I come into the office, I login on my home server using:

workstation$ ssh shell.koumbit.net

... and open my screen session to see if anybody left me messages, and to check my mail:

shell$ screen -R

Obviously, if my irssi session has terminated because of a crash or a return from vacation, i need to start it again:

shell$ irssi

I usually leave that session opened to check my mail, but then for IRC, i start the proxy client using the above script, which provides for notifications:

workstation$ ./bin/irssi_proxy

This just starts irssi in client mode. I can also run just the latter script without launching ssh manually if i'm in a hurry.

Note that contrary to scyrma's technique, I do not get messages through mail while I'm gone, I go through my screen session manually.

mvc technique: simple script

To get gnome to notify me with a graphical popup when I'm mentioned in irc, I used this tutorial: http://pthree.org/2007/03/21/irssi-gui-notify/

The steps are:

  1. run irssi on shell.koumbit.net
  2. make sure notify-send is installed locally (provided by libnotify-bin on debian and ubuntu)

  3. place fnotify.pl in ~/.irssi/scripts/autorun/fnotify.pl on shell.k.n

  4. if you want to run the script without restarting irssi, copy it to ~/.irssi/scripts/fnotify.pl and type /RUN fnotify.pl

  5. place irssi-notify.sh in ~/bin/irssi-notify.sh on your local machine

  6. in irssi-notify.sh change your.ssh.host to shell.koumbit.net and change the notify-send invocation line to notify-send -i gtk-dialog-info -- "${heading}" "${message}"

  7. make sure that your ssh key is on shell.koumbit.net
  8. start this script at session login ( go to System > Preferences > Startup Applications and select bin/irssi-notify.sh)

Copies of the above scripts in case the links go stale:

At step 8 if you're using gnome 3, you need to create a file ~/.config/autostart/irssi-notify.desktop with content similar to this:

[Desktop Entry]
Type=Application
Exec=/home/youruser/bin/irssi-notify.sh
Hidden=false
NoDisplay=false
X-GNOME-Autostart-enabled=true
Name[en_CA]=irssi-notify
Name=irssi-notify
Comment[en_CA]=Irssi notifications
Comment=Irssi notifications

debugging the mvc technique

Testing

Either get someone to ping you, or /msg goumbot ping - the resulting pong should trigger a notify for most irssi configs

Starting fnotify manually
I've noticed that fnotify does not always start automatically when placed in autorun - so try the instructions in step 4 to be sure you are not affected by this issue.

emm technique for OSX (Yosemite)

Same as mvc with a twist! Read mvc technique first and then come back here.

  1. run irssi on shell.koumbit.net
  2. place fnotify.pl in ~/.irssi/scripts/autorun/fnotify.pl on shell.k.n

  3. install Growl (not free)

  4. install growlnotify

  5. install Keyboard Maestro (not free)

Since I have already Growl and Keyboard Maestro, it's not a problem for me to use these paid applications. But I will try later to show how to replace these with free alternatives (using osascript -e to call the display notification command to replace Growl, and cron to replace Keyboard Maestro).

Instead of Growl and Keyboard Maestro you can use these two free solutions:

osascript -e 'display notification "Lorem ipsum dolor sit amet" with title "Title"'

Here's the script you have to install on your Mac in ~/bin/irssi_growlnotifier.sh (this is based on this excellent tutorial find here.

# irssi_growlnotifier.sh
# based on http://www.matthewhutchinson.net/2010/8/21/irssi-screen-fnotify-and-growl-on-osx

SCRIPT_NOT_RUNNING=`ps aux|grep -i ssh|grep "emmanuel@shell.koumbit.net -o PermitLocalCommand"`

if [ -z "$SCRIPT_NOT_RUNNING" ]
then
(ssh emmanuel@shell.koumbit.net -o PermitLocalCommand=no ": > .irssi/fnotify ; tail -f .irssi/fnotify " |  \
while read heading message; do                      \
  /usr/local/bin/growlnotify -s -t "${heading}" -m "${message}";      \
done)&
else exit
fi

Since ssh is not mosh, and Yosemite is quite aggressive terminating non active connections, we use Keyboard Maestro to relaunch the script irssi_growlnotifier.sh when you log in your Mac, or when the Mac wake up from sleep.

  1. Create a new macro in Keyboard Maestro called Launch irssi_growler.sh.

  2. Add the trigger At system wake

  3. Add the trigger At login

  4. Add the trigger The status item is selected: this is for launching the script from the Keyboard Maestro menu if both triggers don't work.

  5. Add the action Execute a shell script with Execute script file and point this action to ~/bin/irssi_growlnotifier.sh

Start a screen session and connect to shell.koumbit.net and launch irssi.

Launch the ~/bin/irssi_growlnotifier.sh script either via your local shell or the Keyboard Maestro menu.

You are now all set!

-- EmmanuelDecarie 2015-03-26 05:42:11

Pancake technique - start shell and notify with keyboard shortcut

One keyboard shortcut to do the following:

First create a script to initiate the ssh session. and place it somewhere like ~/bin/ssh_kshell.sh (chmod 700)

#
# start an ssh session and attach the screen running irssi

ssh -t pancake@shell.koumbit.net "screen -Dr irssi" # Detach the screen first!

Then add this to your irssi-notify.sh file after the ICON Variable

...
ICON="$HOME/.local/share/icons/irssi-icon.png" # on local host

deepin-terminal -q -e $HOME/bin/ssh_kshell.sh |

notify-send -i gtk-dialog-info -i ...
...

I'm using deepin terminal, but options for other terminals should be similar.

Next, just bind ~/bin/irrsi-notify.sh to a keyboard shortcut!

ET VOILÀ!

Tor

Il est possible camoufler l'origine de sa connexion sur un réseau irc avec Tor.

Méthode A

Pour sécuriser la connexion, on utilise l'authentification avec sals. http://www.andrews-corner.org/irssi.html

Sous Debian, on a besoin des paquets suivants aussi: libcrypt-openssl-bignum-perl, libcrypt-dh-perl, libcrypt-blowfish-perl

$ mkdir -pv $HOME/.irssi/scripts/autorun && cd $HOME/.irssi/scripts
$ wget http://freenode.net/sasl/cap_sasl.pl
$ cd autorun
$ ln -sv ../cap_sasl.pl

bientôt le reste de la configuration.

$ torify irssi

Méthode B

Installer torsocks et rouler:

env -i TERM=$TERM torsocks irssi --config=/dev/null -\!

env -i flushes your environment to make sure your identity doesn't through to the server.

See also


CategoryGuide

Irssi (last edited 2020-05-25 13:37:58 by nina)