Irssi 0.8.17

ailin-nemui edited this page Apr 19, 2016 · 3 revisions

Table of Contents

Testing new Irssi

Hi and thanks for your interest in Irssi 0.8.17. To make it better, please try it. Please contribute to this wiki post if you can.

If you haven't installed the new Irssi yet and need help in doing so, check below in the Compiling section.

Verifying the colours

Once you've launched the new Irssi, you can use /cubes to review the colours. The output should look like this:

If you don't have the /cubes script yet, because you want to continue using your old config, you can go to http://anti.teamidiot.de/static/nei/*/Code/Irssi/ , open the file cubes-alias.txt and copy&paste the content (as one single line) into your Irssi window. Then you will have it.

if you have any colour mismatches, refer to the troubleshooting section below.

Now how to use the colours? For use in chat with other people, you will want to look at the 99 mIRC colours. These can be input with Ctrl+C followed by the number, example: Ctrl+C 52hello to write "hello" in red. Background can be specified after a comma, e.g. Ctrl+C 52,08 to write in red on yellow. Do note, many channels filter out colours by using the channel mode +c. That means, if you send colours, others won't receive them (the server will remove them from your message before delivering it to others)

The upper half of the pane is mostly useful for Script and Theme authors (or if you want to modify your own theme, for example altering some status bar background colours). These codes can be used by prefixing them with %x or %X inside the theme, or simply by prefixing them with X in the nickcolor_expando script. Also see the formats page for more details.

Testing true colours

Irssi can support true colour display, however this also requires support in the terminal. Suckless' st Terminal has support for it, as have Gnome-Terminal based apps starting with Gnome 3.12 and KDE Konsole. Neither screen nor tmux support it last time I checked. dtach should work fine. To test the true colours, you can use the following command:

/exec - wget -qO- http://anti.teamidiot.de/static/nei/banner.ans

You also need to /set colors_ansi_24bit on to tell Irssi that your terminal will support these codes. If it works, it should look like this:

If you disable the setting, Irssi will try to approximate the colours with 256 colours instead.

In case your terminal does not support true colour codes, it might result in the most weird effects, possibly including blinking texts etc. You can always turn off the colors_ansi_24bit setting again in that case.

If your Irssi doesn't know this setting, check the compiling section.

Inside themes, the 24bit colours are likewise accessible by prefixing the HTML-style hex colour with %Z or %z instead of #, for example %Zff3a2c to print some orange text.

Using italics

Italics is another "new" text attribute that can be used in chats in two ways: Either by using the mIRC-style Ctrl+] shortcut to add this formatting code (this may again be removed by the server when channel mode +c is enabled), or by surrounding the /word/ with slashes. To enable the // syntax, you need to do /set emphasis_italics on

Example:

Italics is not supported by all terminals. Some terminals may support it, but it is not correctly specified in their terminfo. In that case Troubleshooting may help. Inside themes, italics can be used with the %I format

Testing the rewrite of buffer history features

Irssi's API to change the buffer content has been restored (albeit differently than originally). There are some scripts on http://anti.teamidiot.de/static/nei/*/Code/Irssi/ to demonstrate this new abilities:

  • dim_nicks can change the colour of nicks after they have left the channel (useful if you /ignore * PARTS QUITS to see if someone is still there)
    • Configure the colour with /set dim_nicks_color
    • To use italics (if supported by terminal), set it to: %I$*%I
  • hideshow can remove (hide) and restore lines that you want to hide, for example JOINS/PARTS/QUITS. It can optionally work together with a modified recentdepart script to act as a "smart filter" of only hiding some joins/parts.
    • To enable it, /set hideshow_level JOINS PARTS QUITS and toggle the hidden lines with /toggle hideshow_hide
    • Or load recentdepart and /set recdep_use_hideshow ON to only hide lines that recentdepart would hide, instead of ignoring them
    • (Make sure you /unignore a previous ignore rule if you want to try hiding instead)
  • trackbar-soliton on that page has been modified to dynamically change the trackbar width if you change your window size (to match the full screen width)

New way to ignore activity notification

/ignore now adds a new switch NO_ACT that can be used to ignore activity notifications (it does not ignore the message) This can be used to better control which events should notify you, in addition to the activity_hide_level and activity_hide_targets settings. TODO: add more details and a nice example here!

Splitting of long messages

if you had previously used one of the splitlong scripts to automatically split up long messages (instead of them silently getting truncated for receivers), that functionality is now built into Irssi

Pretty scripts / themes

Themes

The first 256 colour Irssi theme was done by Myrtti . You can get it at http://myrtti.fi/irssi/roses2014.theme

Nick colouring script for 256 colours

There is a nick colouring script for 256-colour Irssi on http://anti.teamidiot.de/static/nei/*/Code/Irssi/ called nickcolor_expando.pl You can use it together with nm2.pl to replace your old nm.pl Installation (if you want dynamically right aligned nicks), or you can use it standalone by doing

/format pubmsg {pubmsgnick $2 {pubnick $nickcolor$0}}$1

as noted in the instructions when you view the script with a plain text viewer of your choice.

You should configure a set of colours that you want to use, for example by doing the following. This is just an example, please choose your own colours with the help of /cubes and /neatcolor colors

/neatcolor colors add r X66 R X67 X6L X37 X3D X36 X4C X46 X5C X56 X6J X47 X5D X6K X6D X57 X6E X5E X4E X4K X4J X5J X4D X3C X4I y X4O X26 X2D X2C X3I X3O X2J X3P X3J X16 X1C X2I X1I X1O X1P g G X1D X1J X1Q X2R X2K X3K X3Q X2Q X2P X17 X1E X1L X1K X1R X1S c X1M X1N X1T C X28 X2E X18 X1F X19 X1G X1A X1B X1H X2N X2H B X3H X3N X2M X2G X2A X2F X2L X3L X3F X4M X3M X3G X29 X11 X12 X23 X25 X24 X13 X14 b X15 X2B X4N X22 M X45 X5B X6A X5A X5H X3B X4H X3A X4G X39 X4F X5L X5N X21 X53 X52 X34 X35 X55 X65 X6B X4B X4A X48 X5G X6H X5M X6M X6N X38 X54 X51 X69 X68 X59 X5F X6F X58 X49 X6G X27 X3E X4L

nickcolor_expando can further be extended with colorize_nicks to colour nicks inside the message texts.



Compiling / Installing

To be extended... maybe by you? Most distributions won't have a irssi 0.8.17 package yet, so you may need to compile Irssi yourself. On some shells or servers where you only have a user account, compiling might still be possible. It depends on whether they have a compiler and the Perl development files installed (it should work on most *BSD installations)

Most distributions can automatically install the prerequisites needed to build a program that had been packaged before, so please run these commands as admin:
yum install yum-utils; yum-builddep irssi
apt-get build-dep irssi
zypper si -d irssi

If you only have user level access on some server/shell, you can still try to unpack the irssi 0.8.17 tarball and see if it can be configured/compiled there. You can also prepare such a tarball yourself from git sources if you have a local Linux box with root access.

Distribution packages

On SuSE, you can go to their software page and click on Unstable / 1-click-install to try the new Irssi

Debian users of testing or unstable will also find irssi by doing
apt-get install irssi
Backports for wheezy are available in the official wheezy-backports archive.

Arch Linux has updated package as well

There are Fedora 21 Packages in the Fedora build system

Solaris OpenCSW is already up to date as well

Unofficial packages

There are unofficial Ubuntu/Debian/Suse packages available on http://download.opensuse.org/repositories/home:/ailin_nemui:/irssi/

Cygwin builds are available on https://github.com/quuiqueee/irssi-for-windows

Compiling from Git

If you can, try the latest and greatest Irssi from Git. This will require you have the git program installed. You can install git as Admin with yum install git, zypper in git, apt-get install git depending on your distribution. To create the configure script, you will also need to have the GNU autotools and lynx present. On Red Hat systems, you may need to add perl-core as well. Here are some recipes to install it:
apt-get install build-essential automake autoconf libtool lynx
yum install automake autoconf libtool lynx perl-core
zypper in automake autoconf libtool lynx

Next, download the Irssi sources from git by doing
git clone https://github.com/irssi/irssi.git

Then, change into the irssi directory by doing
cd irssi

Now you need to create the configure script, this is done by running
./autogen.sh

Now it should be possible to compile irssi with make && sudo make install

Using true colours (24bit colours)

If you want to enable true colour support, run ./configure --enable-true-color before doing make

Scripting (Perl) doesn't work

If Perl scripting isn't available in your self-compiled irssi, you may need to install the perl development files:
apt-get install libperl-dev

Preparing a tarball from git

Just run
make dist to create a tar ball that you might be able to unpack and compile on a shared host, if it has the C compiler and glib files installed (but not git/autotools/etc.)

Sample ./configure output:

Building text frontend ........... : yes, using terminfo
Building irssi bot ............... : no
Building irssi proxy ............. : no
Building with module support ..... : yes
Building with Perl support ....... : module
Perl library directory ........... : /usr/lib/perl5/x86_64-linux-thread-multi
Install prefix ................... : /usr/local

Building with IPv6 support ....... : yes
Building with SSL support ........ : yes
Building with 64bit DCC support .. : yes
Building with garbage collector .. : no
Building with DANE support ....... : no
Building with true color support.. : yes

If there are any problems, read the INSTALL file.

Using the tarball

might be slightly easier. After downloading irssi-0.8.17.tar.gz , you can unpack it with


tar xzvf irssi-0.8.17.tar.gz then
cd irssi-0.8.17 and run ./configure followed by make and sudo make install

If your system is missing some files and you don't have root access, that is often too involved to solve I'm afraid If you have any good tips, please add them here!

User directory Install (for example on shared host)

you can use the command
./configure --prefix=$HOME

followed by make && make install to install Irssi into your ~/bin directory. This may be useful if you don't have root access or prefer a user level install over a system wide install.

Running the new Irssi after successful install

normally, /usr/local/bin is in your path, so just type irssi to get you started. To upgrade irssi to the new binary, you can use


/upgrade /usr/local/bin/irssi

If you installed to your home folder, use /upgrade /home/youruser/bin/irssi instead.

Note: SSL will get disconnected on /upgrade

Troubleshooting

Terminal capabilities are specified using a function called Terminfo. This is a very arcane and confusing concept and I'm really sorry if you have to deal with it. Irssi will consult terminfo to find out about the number of colours (8/16/256) supported by your terminal as well as reverse and italics support and a few other things like background colours for status bars (that's why wrong TERM can cause colour bleed)

Colour Issues

To be extended... maybe by you? Colour issues are mostly caused by wrong TERM values. please echo $TERM on your shell before you start Irssi, it should end with -256color. Examples: xterm-256color, gnome-256color, rxvt-unicode-256color, screen-256color. Inside screen or tmux, TERM must be screen-256color. However, it is also important that TERM is correct before you attach to your tmux or screen!

Another setting that can conflict with colours is mirc_blink_fix. You must /set mirc_blink_fix off or otherwise background colours are limited to 8

PuTTY

under your profile preferences, go to: Settings -> Connection > Data > Terminal-type string and set it to putty-256color (or xterm-256color.

The original XTerm

add to your ~/.Xresources: xterm.termName: xterm-256color and run xrdb -merge ~/.Xresources

Gnome Terminal and variants*

* sakura, gnome terminator, Lilyterm, ROXTerm, evilvte, gnome termit, termite, tilda, stjerm, tinyterm, gtkterm, ... Unfortunately there is a bug in these terminals so they can't be configured. The gnome-terminal and lubvte developer states in this bug report that it is not necessary to be able to configure this variable in the terminal. That's why a lot of ugly hacks have been developed. They are usually something like this, in your ~/.bashrc

if [ "$TERM" = xterm -a "$COLORTERM" = gnome-terminal ]; then
   TERM=vte-256color
fi
This is NOT the suggested way to configure $TERM properly, but you may have no choice if you want to use a terminal which does not offer configurability of this variable.

GNU Screen specific

add this line to your ~/.screenrc: term screen-256color

tmux specific

use this command in your ~/.tmux.conf set -g default-terminal "screen-256color"

Italics problems

To be extended... maybe by you?

Although some terminals may support italics, sometimes it is not correctly written down in their terminfos. xterm supports italics starting with version 307, but its terminfo might still be outdated on the server if you are using it through ssh. To update the terminfo, download xterm and copy the "terminfo" file inside the archive to your server. Then run tic -x ./terminfo on it to install the updated terminfos.

Most annoyingly, the screen terminfo incorrectly encodes italics as reverse, and does not encode italics at all. This causes issues with tmux. Please search the tmux FAQ for "italics" and follow the instructions there (it also involves editing and recompiling the terminfo file with tic)

Checking if your TERMINAL supports italics

use this bash command:
printf '\e[3m%s\e[23m\n' testing

if you get italic testing -- congrats, your term can display italics. If not :-( switch to another terminal

Confirming if TERMINFO supports italics

use this bash command:
tput sitm; echo testing; tput ritm

if you get italic testing -- congrats, your terminfo also knows that your TERM can display italics. If not :-( you may need to fix it up. Manual way:
infocmp -x -1 > myterminfo

open the file with your favourite editor add the two lines:
ritm=\E[23m,
sitm=\E[3m,

into the proper places save and recompile with
tic -x ./myterminfo

Question & Answer section

I have hilights that i created with 0.8.15 and seem sane enough, but the same hilight rules don't work with 0.8.17. For example, matching `/hilight -word -priority 9 -color %m -actcolor %m -regexp \b(word1|word2)_*\b` in the text my word1 test works in 0.8.15 but not in 0.8.17. Is there something different in how we need to define our rules for 0.8.17 to make them work?

- works for me just fine.

Please add your questions here...

Issues should be reported to https://github.com/irssi/irssi/issues