You are not logged in.

#1 2008-04-28 05:25:21

ronandi
Member
From: US
Registered: 2008-04-26
Posts: 65

[SOLVED] Urxvt- Enabling Links?

Can you enable links in urxvt so that when you click them, they open in firefox?

I'm running irssi in urxvt and would prefer this over using the openurl script (which isnt working too well)

Last edited by ronandi (2008-04-28 05:31:44)


Mobo:Gigabyte Technology Co., Ltd. GA-P35-DS4 Rev. 2.0 // Processor:Intel(R) Core(TM)2 Quad CPU Q6600 @ 3 GHz
Memory:Crucial Ballistix PC2-8500 (DDR2-1066) 2046MB RAM
Video Card: MSI NVIDIA GeForce 8800 GTS 512 (G92) 730mhz Sound Card: ASUS Xonar Essence STX Headphones: Sennheiser HD555
Openbox & PyPanel

Offline

#2 2008-04-28 05:28:21

thayer
Fellow
From: Vancouver, BC
Registered: 2007-05-20
Posts: 1,560
Website

Re: [SOLVED] Urxvt- Enabling Links?

ronandi wrote:

Can you enable links in urxvt so that when you click them, they open in firefox?

I'm running irssi in urxvt and would prefer this over using the openurl script (which isnt working too well)

Add the following to ~/.Xdefaults:

urxvt*perl-lib:            /usr/lib/urxvt/perl/
urxvt*perl-ext-common:        default,matcher
urxvt*urlLauncher:        /usr/bin/firefox
urxvt*matcher.button:        1
urxvt*matcher.pattern.1:   \\bwww\\.[\\w-]+\\.[\\w./?&@#-]*[\\w/-]

thayer williams ~ cinderwick.ca

Offline

#3 2008-04-28 05:31:22

ronandi
Member
From: US
Registered: 2008-04-26
Posts: 65

Re: [SOLVED] Urxvt- Enabling Links?

Thanks a lot! Works perfectly.


Mobo:Gigabyte Technology Co., Ltd. GA-P35-DS4 Rev. 2.0 // Processor:Intel(R) Core(TM)2 Quad CPU Q6600 @ 3 GHz
Memory:Crucial Ballistix PC2-8500 (DDR2-1066) 2046MB RAM
Video Card: MSI NVIDIA GeForce 8800 GTS 512 (G92) 730mhz Sound Card: ASUS Xonar Essence STX Headphones: Sennheiser HD555
Openbox & PyPanel

Offline

#4 2008-04-28 18:55:26

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: [SOLVED] Urxvt- Enabling Links?

For the record, your pattern.1 isn't needed. The default pattern is much more thorough.

Also, I think the perl-lib setting may default to the path you have there

Offline

#5 2008-04-28 19:01:51

thayer
Fellow
From: Vancouver, BC
Registered: 2007-05-20
Posts: 1,560
Website

Re: [SOLVED] Urxvt- Enabling Links?

phrakture wrote:

For the record, your pattern.1 isn't needed. The default pattern is much more thorough.

Also, I think the perl-lib setting may default to the path you have there

Ah ha! Thanks for the tip...at some point last year I was looking for the same solution and simply copied it from somewhere else.


thayer williams ~ cinderwick.ca

Offline

#6 2008-04-28 19:19:51

dolby
Member
From: 1992
Registered: 2006-08-08
Posts: 1,581

Re: [SOLVED] Urxvt- Enabling Links?

thayer wrote:
phrakture wrote:

For the record, your pattern.1 isn't needed. The default pattern is much more thorough.

Also, I think the perl-lib setting may default to the path you have there

Ah ha! Thanks for the tip...at some point last year I was looking for the same solution and simply copied it from somewhere else.

you should have copied it from code.phraktured.net  tongue


There shouldn't be any reason to learn more editor types than emacs or vi -- mg (1)
[You learn that sarcasm does not often work well in international forums.  That is why we avoid it. -- ewaller (arch linux forum moderator)

Offline

#7 2008-06-19 23:01:28

Stalafin
Member
From: Berlin, Germany
Registered: 2007-10-26
Posts: 608

Re: [SOLVED] Urxvt- Enabling Links?

Ah, it doesn't actually work. sad

I have the following chunk o' code in my .Xdefaults:

urxvt*perl-ext-common: default,matcher
urxvt*urlLauncher: /usr/bin/firefox3
urxvt*matcher.Button: 1

But nothing happens. sad A URL gets nicely underlined and such, but when I click it nothing happens...


EDIT: Yeah, so the problem was perl-ext-common: It had to be perl-ext. Now everything is nice.

One thing I still don't get is why 'urxvt.matcher.Button' doesn't work for me. No matter what I write (0,1,2) - I can only open a URL with middle click. Neither left (which is supposed to be one 1) nor right (I guess on 3) work. It always, no matter what I have written there, defaults to the middle mouse button.

Ideas?

Last edited by Stalafin (2008-06-20 13:30:41)

Offline

Board footer

Powered by FluxBB