From c34082d99f8d4071a29dec2ac11dedffe47c0b0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bert=20M=C3=BCnnich?= Date: Thu, 16 Aug 2012 11:41:33 +0200 Subject: [PATCH] Made all options namespaced --- README.md | 18 +++++++++--------- clipboard | 16 ++++++++-------- url-select | 12 ++++++------ 3 files changed, 23 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index 2aa1f25..e141cea 100644 --- a/README.md +++ b/README.md @@ -61,11 +61,11 @@ Use Meta-u to activate URL selection mode, then use the following keys: Options: - URxvt.autoCopyURLs: If set to true, selected URLs are automaticaly copied - to the PRIMARY clipboard + URxvt.url-select.autocopy: if set to true, selected URLs are automatically + 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.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 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. The default ones are: - URxvt.copyCommand: xsel -ib - URxvt.pasteCommand: xsel -ob + URxvt.clipboard.copycmd: xsel -ib + URxvt.clipboard.pastecmd: xsel -ob If you prefer xclip, then put these lines in your .Xdefaults/.Xresources: - URxvt.copyCommand: xclip -i -selection clipboard - URxvt.pasteCommand: xclip -o -selection clipboard + URxvt.clipboard.copycmd: xclip -i -selection clipboard + URxvt.clipboard.pastecmd: xclip -o -selection clipboard On Mac OS X, put these lines in your .Xdefaults/.Xresources: - URxvt.copyCommand: pbcopy - URxvt.pasteCommand: pbpaste + URxvt.clipboard.copycmd: pbcopy + URxvt.clipboard.pastecmd: pbpaste The use of the functions should be self-explanatory! diff --git a/clipboard b/clipboard index 5c66a87..3b00ad7 100644 --- a/clipboard +++ b/clipboard @@ -15,14 +15,14 @@ # You can also overwrite the system commands to use for copying/pasting. # The default ones are: -# URxvt.copyCommand: xsel -ib -# URxvt.pasteCommand: xsel -ob +# URxvt.clipboard.copycmd: xsel -ib +# URxvt.clipboard.pastecmd: xsel -ob # If you prefer xclip, then put these lines in your .Xdefaults/.Xresources: -# URxvt.copyCommand: xclip -i -selection clipboard -# URxvt.pasteCommand: xclip -o -selection clipboard +# URxvt.clipboard.copycmd: xclip -i -selection clipboard +# URxvt.clipboard.pastecmd: xclip -o -selection clipboard # On Mac OS X, put these lines in your .Xdefaults/.Xresources: -# URxvt.copyCommand: pbcopy -# URxvt.pasteCommand: pbpaste +# URxvt.clipboard.copycmd: pbcopy +# URxvt.clipboard.pastecmd: pbpaste # The use of the functions should be self-explanatory! @@ -31,8 +31,8 @@ use strict; sub on_start { my ($self) = @_; - $self->{copy_cmd} = $self->x_resource('copyCommand') || 'xsel -ib'; - $self->{paste_cmd} = $self->x_resource('pasteCommand') || 'xsel -ob'; + $self->{copy_cmd} = $self->x_resource('clipboard.copycmd') || 'xsel -ib'; + $self->{paste_cmd} = $self->x_resource('clipboard.pastecmd') || 'xsel -ob'; () } diff --git a/url-select b/url-select index 3a10d0a..1977501 100755 --- a/url-select +++ b/url-select @@ -21,10 +21,10 @@ # q/Escape: Deactivate URL selection mode # 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.underline: If set to true, all URLs get underlined -# URvxt.url-select.button: Mouse button to click-open URLs (default: 2) use strict; @@ -40,8 +40,8 @@ sub on_start { if ($self->x_resource('url-select.underline') eq 'true') { $self->enable(line_update => \&line_update); } - if ($self->x_resource('autoCopyURLs') eq 'true') { - $self->{copy} = 1; + if ($self->x_resource('url-select.autocopy') eq 'true') { + $self->{autocopy} = 1; } if ($self->x_resource('url-select.button') =~ /^\d+$/) { $self->{button} = $self->x_resource('url-select.button'); @@ -200,7 +200,7 @@ sub select_next { # another url on current line $self->{n} += $dir; hilight($self); - if ($self->{copy}) { + if ($self->{autocopy}) { my $found = $self->{found}[$self->{n}]; $self->selection_beg(${$found}[0], ${$found}[1]); $self->selection_end(${$found}[2], ${$found}[3]); @@ -232,7 +232,7 @@ sub select_next { $self->{row} = $row; $self->{n} = $dir < 0 ? $#{$self->{found}} : 0; hilight($self); - if ($self->{copy}) { + if ($self->{autocopy}) { my $found = $self->{found}[$self->{n}]; $self->selection_beg(${$found}[0], ${$found}[1]); $self->selection_end(${$found}[2], ${$found}[3]);