url-select: make options namespaced
This commit is contained in:
parent
19da7013ce
commit
8d8d6e4a00
@ -61,9 +61,9 @@ Use Meta-u to activate URL selection mode, then use the following keys:
|
|||||||
|
|
||||||
Options:
|
Options:
|
||||||
|
|
||||||
URxvt.urlLauncher: browser/command to open selected URL with
|
URxvt.url-select.launcher: browser/command to open selected URL with
|
||||||
URxvt.underlineURLs: if set to true, all URLs get underlined
|
URxvt.url-select.underline: if set to true, all URLs get underlined
|
||||||
URvxt.urlButton: mouse button to click-open URLs (default: 2)
|
URvxt.url-select.button: mouse button to click-open URLs (default: 2)
|
||||||
|
|
||||||
For compatibility reasons, url-select will also use any patterns defined for
|
For compatibility reasons, url-select will also use any patterns defined for
|
||||||
the matcher extension by reading all `URxvt.matcher.pattern.[0-9]` resources.
|
the matcher extension by reading all `URxvt.matcher.pattern.[0-9]` resources.
|
||||||
|
17
url-select
17
url-select
@ -21,10 +21,9 @@
|
|||||||
# q/Escape: Deactivate URL selection mode
|
# q/Escape: Deactivate URL selection mode
|
||||||
|
|
||||||
# Options:
|
# Options:
|
||||||
# URxvt.urlLauncher: Browser/command to open selected URL with
|
# URxvt.url-select.launcher: Browser/command to open selected URL with
|
||||||
# URxvt.underlineURLs: If set to true, all URLs get underlined
|
# URxvt.url-select.underline: If set to true, all URLs get underlined
|
||||||
# URvxt.urlButton: Mouse button to click-open URLs (default: 2)
|
# URvxt.url-select.button: Mouse button to click-open URLs (default: 2)
|
||||||
|
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
|
|
||||||
@ -32,16 +31,16 @@ sub on_start {
|
|||||||
my ($self) = @_;
|
my ($self) = @_;
|
||||||
|
|
||||||
# read resource settings
|
# read resource settings
|
||||||
if ($self->x_resource('urlLauncher')) {
|
if ($self->x_resource('url-select.launcher')) {
|
||||||
@{$self->{browser}} = split /\s+/, $self->x_resource('urlLauncher');
|
@{$self->{browser}} = split /\s+/, $self->x_resource('url-select.launcher');
|
||||||
} else {
|
} else {
|
||||||
@{$self->{browser}} = ('x-www-browser');
|
@{$self->{browser}} = ('x-www-browser');
|
||||||
}
|
}
|
||||||
if ($self->x_resource('underlineURLs') eq 'true') {
|
if ($self->x_resource('url-select.underline') eq 'true') {
|
||||||
$self->enable(line_update => \&line_update);
|
$self->enable(line_update => \&line_update);
|
||||||
}
|
}
|
||||||
if ($self->x_resource('urlButton') =~ /^\d+$/) {
|
if ($self->x_resource('url-select.button') =~ /^\d+$/) {
|
||||||
$self->{button} = $self->x_resource('urlButton');
|
$self->{button} = $self->x_resource('url-select.button');
|
||||||
} elsif ($self->x_resource('matcher.button') =~ /^\d+$/) {
|
} elsif ($self->x_resource('matcher.button') =~ /^\d+$/) {
|
||||||
$self->{button} = $self->x_resource('matcher.button');
|
$self->{button} = $self->x_resource('matcher.button');
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user