This article is deprecated. You can find an updated version here.

Using urxvt / rxvt-unicode very often as my prefered terminal emulator I thought it would be nice to have clickable links. Reading through the manpage and searching in google I found out about the built in urxvt’s perl extensions and that this was possible.

Just add the following to your .Xdefaults:

URxvt.perl-ext-common: default,matcher
URxvt.urlLauncher: firefox
URxvt.matcher.button: 2
URxvt.matcher.pattern.1: \\bwww\\.[\\w-]\\.[\\w./?&@#-]*[\\w/-]

Now you just need to replace firefox with your favorite browsers startup script and choose which mousebutton should be handled. Button 2 is the middle mouse button and clicking a link with it now opens it directly in firefox without copy and paste or other timewasting things ;)

The great advantage of this solution is that you don’t depend on things like the openurl.pl script for irssi which doesn’t work using irssi in a screen remotely as I (and many other) do.

links in urxvt