Made all options namespaced
This commit is contained in:
parent
6139557a85
commit
c34082d99f
18
README.md
18
README.md
@ -61,11 +61,11 @@ Use Meta-u to activate URL selection mode, then use the following keys:
|
|||||||
|
|
||||||
Options:
|
Options:
|
||||||
|
|
||||||
URxvt.autoCopyURLs: If set to true, selected URLs are automaticaly copied
|
URxvt.url-select.autocopy: if set to true, selected URLs are automatically
|
||||||
to the PRIMARY clipboard
|
copied to the PRIMARY buffer
|
||||||
|
URvxt.url-select.button: mouse button to click-open URLs (default: 2)
|
||||||
URxvt.url-select.launcher: browser/command to open selected URL with
|
URxvt.url-select.launcher: browser/command to open selected URL with
|
||||||
URxvt.url-select.underline: if set to true, all URLs get underlined
|
URxvt.url-select.underline: if set to true, all URLs get underlined
|
||||||
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.
|
||||||
@ -86,17 +86,17 @@ After installing, put the following lines in your .Xdefaults/.Xresources:
|
|||||||
You can also overwrite the system commands to use for copying/pasting.
|
You can also overwrite the system commands to use for copying/pasting.
|
||||||
The default ones are:
|
The default ones are:
|
||||||
|
|
||||||
URxvt.copyCommand: xsel -ib
|
URxvt.clipboard.copycmd: xsel -ib
|
||||||
URxvt.pasteCommand: xsel -ob
|
URxvt.clipboard.pastecmd: xsel -ob
|
||||||
|
|
||||||
If you prefer xclip, then put these lines in your .Xdefaults/.Xresources:
|
If you prefer xclip, then put these lines in your .Xdefaults/.Xresources:
|
||||||
|
|
||||||
URxvt.copyCommand: xclip -i -selection clipboard
|
URxvt.clipboard.copycmd: xclip -i -selection clipboard
|
||||||
URxvt.pasteCommand: xclip -o -selection clipboard
|
URxvt.clipboard.pastecmd: xclip -o -selection clipboard
|
||||||
|
|
||||||
On Mac OS X, put these lines in your .Xdefaults/.Xresources:
|
On Mac OS X, put these lines in your .Xdefaults/.Xresources:
|
||||||
|
|
||||||
URxvt.copyCommand: pbcopy
|
URxvt.clipboard.copycmd: pbcopy
|
||||||
URxvt.pasteCommand: pbpaste
|
URxvt.clipboard.pastecmd: pbpaste
|
||||||
|
|
||||||
The use of the functions should be self-explanatory!
|
The use of the functions should be self-explanatory!
|
||||||
|
16
clipboard
16
clipboard
@ -15,14 +15,14 @@
|
|||||||
|
|
||||||
# You can also overwrite the system commands to use for copying/pasting.
|
# You can also overwrite the system commands to use for copying/pasting.
|
||||||
# The default ones are:
|
# The default ones are:
|
||||||
# URxvt.copyCommand: xsel -ib
|
# URxvt.clipboard.copycmd: xsel -ib
|
||||||
# URxvt.pasteCommand: xsel -ob
|
# URxvt.clipboard.pastecmd: xsel -ob
|
||||||
# If you prefer xclip, then put these lines in your .Xdefaults/.Xresources:
|
# If you prefer xclip, then put these lines in your .Xdefaults/.Xresources:
|
||||||
# URxvt.copyCommand: xclip -i -selection clipboard
|
# URxvt.clipboard.copycmd: xclip -i -selection clipboard
|
||||||
# URxvt.pasteCommand: xclip -o -selection clipboard
|
# URxvt.clipboard.pastecmd: xclip -o -selection clipboard
|
||||||
# On Mac OS X, put these lines in your .Xdefaults/.Xresources:
|
# On Mac OS X, put these lines in your .Xdefaults/.Xresources:
|
||||||
# URxvt.copyCommand: pbcopy
|
# URxvt.clipboard.copycmd: pbcopy
|
||||||
# URxvt.pasteCommand: pbpaste
|
# URxvt.clipboard.pastecmd: pbpaste
|
||||||
|
|
||||||
# The use of the functions should be self-explanatory!
|
# The use of the functions should be self-explanatory!
|
||||||
|
|
||||||
@ -31,8 +31,8 @@ use strict;
|
|||||||
sub on_start {
|
sub on_start {
|
||||||
my ($self) = @_;
|
my ($self) = @_;
|
||||||
|
|
||||||
$self->{copy_cmd} = $self->x_resource('copyCommand') || 'xsel -ib';
|
$self->{copy_cmd} = $self->x_resource('clipboard.copycmd') || 'xsel -ib';
|
||||||
$self->{paste_cmd} = $self->x_resource('pasteCommand') || 'xsel -ob';
|
$self->{paste_cmd} = $self->x_resource('clipboard.pastecmd') || 'xsel -ob';
|
||||||
|
|
||||||
()
|
()
|
||||||
}
|
}
|
||||||
|
12
url-select
12
url-select
@ -21,10 +21,10 @@
|
|||||||
# q/Escape: Deactivate URL selection mode
|
# q/Escape: Deactivate URL selection mode
|
||||||
|
|
||||||
# Options:
|
# Options:
|
||||||
# URxvt.autoCopyURLs: If set to true, selected URLs are copied
|
# URxvt.url-select.autocopy: If true, selected URLs are copied to PRIMARY
|
||||||
|
# URvxt.url-select.button: Mouse button to click-open URLs (default: 2)
|
||||||
# URxvt.url-select.launcher: Browser/command to open selected URL with
|
# URxvt.url-select.launcher: Browser/command to open selected URL with
|
||||||
# URxvt.url-select.underline: If set to true, all URLs get underlined
|
# URxvt.url-select.underline: If set to true, all URLs get underlined
|
||||||
# URvxt.url-select.button: Mouse button to click-open URLs (default: 2)
|
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
|
|
||||||
@ -40,8 +40,8 @@ sub on_start {
|
|||||||
if ($self->x_resource('url-select.underline') 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('autoCopyURLs') eq 'true') {
|
if ($self->x_resource('url-select.autocopy') eq 'true') {
|
||||||
$self->{copy} = 1;
|
$self->{autocopy} = 1;
|
||||||
}
|
}
|
||||||
if ($self->x_resource('url-select.button') =~ /^\d+$/) {
|
if ($self->x_resource('url-select.button') =~ /^\d+$/) {
|
||||||
$self->{button} = $self->x_resource('url-select.button');
|
$self->{button} = $self->x_resource('url-select.button');
|
||||||
@ -200,7 +200,7 @@ sub select_next {
|
|||||||
# another url on current line
|
# another url on current line
|
||||||
$self->{n} += $dir;
|
$self->{n} += $dir;
|
||||||
hilight($self);
|
hilight($self);
|
||||||
if ($self->{copy}) {
|
if ($self->{autocopy}) {
|
||||||
my $found = $self->{found}[$self->{n}];
|
my $found = $self->{found}[$self->{n}];
|
||||||
$self->selection_beg(${$found}[0], ${$found}[1]);
|
$self->selection_beg(${$found}[0], ${$found}[1]);
|
||||||
$self->selection_end(${$found}[2], ${$found}[3]);
|
$self->selection_end(${$found}[2], ${$found}[3]);
|
||||||
@ -232,7 +232,7 @@ sub select_next {
|
|||||||
$self->{row} = $row;
|
$self->{row} = $row;
|
||||||
$self->{n} = $dir < 0 ? $#{$self->{found}} : 0;
|
$self->{n} = $dir < 0 ? $#{$self->{found}} : 0;
|
||||||
hilight($self);
|
hilight($self);
|
||||||
if ($self->{copy}) {
|
if ($self->{autocopy}) {
|
||||||
my $found = $self->{found}[$self->{n}];
|
my $found = $self->{found}[$self->{n}];
|
||||||
$self->selection_beg(${$found}[0], ${$found}[1]);
|
$self->selection_beg(${$found}[0], ${$found}[1]);
|
||||||
$self->selection_end(${$found}[2], ${$found}[3]);
|
$self->selection_end(${$found}[2], ${$found}[3]);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user