rxvt-unicode, mark-urls, open links in opera (or any other browser)

kategorie: howto
publikoval: robo
datum a čas: 26-11-2006 20:56:33

This article is out-of-date, please see this for up-to-date info.

As my terminal of choice I use rxvt-unicode. There is rather nice feature - perl extension support. There are some extensions already installed on my system (Gentoo) in /usr/lib/urxvt/perl/ and of course the one we are going to use is there too - mark-urls.

mark-urls recognizes URLs in text on your terminal screen and you can open them in your browser of choice. Following lines are from my ~/.Xdefaults:

URxvt*perl-ext-common:    mark-urls
URxvt*urlLauncher:    /home/robo/bin/opera_start_new_tab

From this time recognized URLs are underlined and you can click them with middle mouse button. URL is then passed to opera_start_new_tab script which contains:

#!/bin/sh

opera -newpage $1

I was not able to make it work directly from .Xdefaults (without wrapper script). I don't know why. Script works.

That's all. Enjoy.

Přidej příprcek: