Created Sunday 12 February 2017
irssi is a CLI Internet Relay Chat (IRC) client.
My irssi configuration (Github) requires a lot of the Scripts included in this article. Download all the scripts and symlink to autorun (as explained later Scripts). Irssi will be run inside a Tmux instance (better than Screen for this purpose) - an Alias is included in my configuration files, and below you'll find a Desktop file for quickly running irssi from dmenu.
Installation
# The Client
$ pacman -S irssi
Desktop Notifications
# This requires notify-listener is running in the background (xinitrc)
$ yaourt -S irssi-libnotify-git
# Create the scripts/autorun folder, if it doesn't already exist; ~/.irssi/scripts/autorun
# And create a Symlink from the Script to that folder
$ ln -s /usr/share/irssi/scripts/notify.pl /home/stick/.irssi/scripts/autorun/
Tmux
# Tmux will be used for better Nicklist and Channel list
$ pacman -S tmux
# Configuration (Github) is read from ~/.tmux.conf
# Then create a file at /etc/systemd/system/tmux@.service with the following;
[Unit] Description=Start tmux in detached session [Service] Type=forking User=%I ExecStart=/usr/bin/tmux new-session -s %u -d ExecStop=/usr/bin/tmux kill-session -t %u [Install] WantedBy=multi-user.target
# And enable the service file - change username (stick) accordingly
$ systemctl enable tmux@stick.service
Configuration
# Configuration at Github - read from ~/.irssi/config
# Once you've find configurations you like, use the /set command
# Ex, for timestamp format (hour : min : sec)
# Then save it to the configuration file (persistent)
# You are also able to save the layout (window arrangement, split windows etc)
Themes
# Theme library at https://irssi-import.github.io/themes/
# Themes can be stored in ~/.irssi
# Then load them with
# Don't forget to save if you want it be persistent
SSL Connection (Freenode)
# Freenode uses a different port for SSL, open irssi and specify it
# Then create a certificate that is valid for 730 days
# This will take you through a few steps - you don't have to fill em out.
$ openssl req -newkey rsa:2048 -days 730 -x509 -keyout irssi.key -out irssi.crt -nodes
$ cat irssi.crt irssi.key > ~/.irssi/irssi.pem
$ chmod 600 ~/.irssi/irssi.pem
$ rm irssi.crt irssi.key
# To get your fingerprint (used in next step)
$ openssl x509 -sha1 -fingerprint -noout -in ~/.irssi/irssi.pem | sed -e 's/^.*=//;s/://g;y/ABCDEF/abcdef/'
# In irssi, disconnect and add the certificate
/server add -ssl_cert ~/.irssi/irssi.pem -network freenode chat.freenode.net 6697
# and connect back to Freenode again
/msg NickServ identify YOUR_PASSWORD
/msg NickServ cert add YOUR_FINGERPRINT
Scripts
# Scripts can be added to ~/.irssi/scripts
# Then loaded with
# To autostart a script upon starting irssi, symlink from the ~/.irssi/scripts/ to ~/.irssi/scripts/autorun/
# Ex, to autostart the ASCII script, download it to ~/.irssi/scripts/ascii.pl
# And the symlink it to the autorun folder (create if needed)
$ ln -s /home/stick/.irssi/scripts/ascii.pl /home/stick/.irssi/scripts/autorun/
# Scripts can be found at https://scripts.irssi.org/ - here are some of the favourites^
ASCII art
# Based on figlet
# Use with; /ascii [-c1234] <TEXT>
# https://github.com/irssi/scripts.irssi.org/blob/master/scripts/ascii.pl
Unicode Emoticons
# Outputs various Unicode emoticons
# Use with; /emo
# https://github.com/irssi/scripts.irssi.org/blob/master/scripts/emo.pl
Autostuff
# Quickly save Channels, Servers and Windows for auto connect/arrange
# Save with; /autostuff
# https://github.com/irssi/scripts.irssi.org/blob/master/scripts/autostuff.pl
Highlight Window
# Monitors in all channels and highlight things that concerns you
# https://github.com/irssi/scripts.irssi.org/blob/master/scripts/hilightwin.pl
# Create a split window with the name of hilight
/window name hilight
Nicklist
# To get a nickname list.
# Run irssi inside a Tmux terminal-window.
# https://github.com/irssi/scripts.irssi.org/blob/master/scripts/tmux-nicklist-portable.pl
Assign Colors to Nicknames
# Different colors for Nicks
# https://github.com/irssi/scripts.irssi.org/blob/master/scripts/nickcolor.pl
Channel list
# For a channel list on the left side (run irssi from inside Tmux)
# https://github.com/irssi/scripts.irssi.org/blob/master/scripts/adv_windowlist.pl
Prompt bar
# Animated prompt bar
# https://github.com/irssi/scripts.irssi.org/blob/master/scripts/twprompt.pl
# Replace the default prompt bar with;
/sbar prompt remove prompt_empty
/sbar prompt add -before input -priority 100 -alignment left twprompt
/toggle twprompt_instruct
/save
ROT13 encode/decode
# https://github.com/irssi/scripts.irssi.org/blob/master/scripts/rot13.pl
# Use with;
/unrot13 <MESSAGE>
Print System info
# https://github.com/irssi/scripts.irssi.org/blob/master/scripts/sysinfo_dg.pl
# Print info with; /sysinfo
Usage
# Some of the basic usage in irssi
# Channel Operators;
<+nick> = Voices
< nick> = Others
Servers and Channels
# Some predefined servers are available, list them with
# To add a new network
# To join a server (ex for Freenode)
# To join a channel on the connected server (ex archlinux)
# To leave a Channel
# Get information about a Channel
Perform auto actions
# To automatically join Channel when you connect to a Network.
# To automatically identify (and wait 2sec before joining channels)
Windows
# You are able to split a window and define what to have in both windows
# Ex, you could have;
Split window 2: win#3 - IRCnet/#channel1, win#4 - IRCnet/#channel2
Split window 3: win#5 - efnet/#channel1, win#6 - efnet/#channel2
# Hitting Alt+6 would take you to the win#6 - efnet/#channel2 window
# To create a new split window
# To create a new hidden window
# To close a split or hidden window
# Make the split window a hidden window
# Define what hidden window number to place it on
# Place a hidden window in the split window
# Those the numeric value of a window
# Shrink, Grow and Balance the Split window
/window grow <NUMBER_OF_LINES>
/window balance
Search text
# Search for all lines with booty
# Only search 10 occurrences
# Print all Topic changes
# If you'd like to get the conversation around a searched word (lines)
# irssi shows the timestamp when you search for words,
# you can then use the scrollback to go back to that period
# To get back to the bottom of the scrollback
Auto Completion/Correction
# irssi has a really sweet feature, where you can tell it to auto complete/correct words
# Say, we want to correct anywyas to anyways - let's say it's a mistake we often do^
# We can also make <tab> completions
# Say we wanna be able to write sio and than <tab> to replace it with http://irssi.org/scripts f.ex.
Profile/nickname
# To set your nickname
# Alternative nickname (if first choice is taken)
Account
# Freenode (deletes inactive users)
# To register as a user
# Then wait for the confirmation mail and follow instructions
# Login to a registered profile (user)
Register Channel
# Instead of bots, you can register a channel with ChanServ
# Give OP to user (including yourself)
# To grant other people full (founder) rights
# To grant other people the Voice rights
# Lock, so that the Topic cant be changed (on/off)
# Use ChanServ as a bot - only leaves when updates, crashes etc from the ChanServ service
# Secure OP - so that only admins will be get the OP status
# Set Email of a Channel
# Set URL of a Channel
Desktop Entry
# To run irssi from your dmenu/rofi, copy the following into ~/.local/share/applications/irssi.desktop
[Desktop Entry] # Can be; Application, Link (web-link), Directory Type=Application # The name of the application Name=irssi # A comment which can/will be used as a tooltip Comment=IRC Client # The executable of the application, possibly with arguments. Exec=urxvt -hold -name irc -e zsh -c 'tmux new-session irssi' # The name of the icon that will be used to display this entry Icon=irc