quadpoint.org Projects · Articles · Notes
A Guide to Efficiently Using Irssi and Screen
Irssi is a text-only IRC client. It does not get in your way and its commands are intuitive and useful. Non-standard features are implemented with perl scripts, rather than in the core. Irssi can range from a functional, no-frills client to a highly-customized and automated client.
Irssi is not the only focus of this guide. GNU screen, the well-known terminal multiplexer, is also discussed. Screen is a highly useful tool that allows a user to manipulate multiple windows inside of a single session. Each window operates independently of the others and acts like another terminal. For example, a user can create a screen session with Irssi running in the first window, an instant messenger program open in the second window, and a general purpose shell prompt in the third window. The beauty of the screen is that users can “detach” from their screens, logout, and then at a later time, login again “reattach” to find their programs still running just as they left them. The steps to do this are explained in this guide.
Irssi Basics
Getting Connected
Switching Windows
Query Windows
More Irssi
Changing Settings
Tab Completion
Perl Scripts
Defining networks and servers
Learning Screen
Starting Screen
Detaching
Reattaching
More Screen Functionality
Troubleshooting
Customizing Irssi’s Display
Theme
Hilight Window
Statusbar
Channel Statusbar Using Advanced Windowlist
Irssi Command Reference
Tips
Launching URLs from rxvt-unicode (urxvt)
UTF-8 in Irssi and Screen
Resources
Irssi Basics
Getting Connected
The first step is to start irssi. Run from your shell:
irssi
You should now see Irssi in its default state–disconnected, with some blue bars at the top and bottom.
In Irssi, there are three important connection-related commands: /server, /connect, and /disconnect. Irssi can handle multiple IRC connections simultaneously, thus it is possible to be active in channels on different networks at the same time. The first command, /server, will connect to the specified server on the current network. On the other hand, /connect will open a new network connection and connect to the specified server on the new network.
For example, typing /connect irc.foo.com will open a new network connection and connect to irc.foo.com. If you then type /connect irc.bar.com, there will be two network connections open, one for irc.foo.com, one for irc.bar.com. Typing /server irc.baz.com while the network connection for irc.bar.com is active will disconnect the client from irc.bar.com and connect to irc.baz.com on that network connection. You can use Ctrl-X to switch between network connections. You can see what the active network is by looking at the status bar, which looks something like this:
(05:23:10) (ms[+abilorsuwxyz]) (1:NullIRC (change with ^X))
In this example, NullIRC is the active network. Feel free to test this on your own. Use /disconnect to disconnect from the active server. Move on after you have disconnected from all servers.
At this point you should have a just-opened instance of Irssi, with no connections to any server. Connect to an IRC server by typing:
/connect irc.nullirc.net
If everything connected fine, join a channel by typing:
/join #test
Switching Windows
You should now notice that the “status” window is now hidden, and you’re looking at the channel you just joined. You should also notice that your status bar says “2:#test”. This means that the window for #test is assigned window number 2. The status window is by default window number 1. To switch between windows in Irssi, use Alt-#, where # is 0-9. Windows start at number 1, and Alt-0 goes to window number 10. You can use Alt-q through Alt-o for windows 11 to 19. It is possible to have more than 19 windows. Use ...