2010-08-13 15:19:52 -04:00
|
|
|
A small collection of perl extensions for the rxvt-unicode terminal emulator.
|
|
|
|
|
|
|
|
Installation
|
|
|
|
------------
|
|
|
|
Simply place the scripts you want to install in the /usr/lib/urxvt/perl/ folder
|
|
|
|
for system-wide availability. You can also put them in a folder of your
|
2011-05-28 06:52:44 -04:00
|
|
|
choice, but then you have to add this line to your .Xdefaults/.Xresources:
|
2010-08-13 15:19:52 -04:00
|
|
|
|
|
|
|
URxvt.perl-lib: /your/folder/
|
|
|
|
|
|
|
|
See the following sections for information on how to enable the scripts or set
|
2011-05-28 06:52:44 -04:00
|
|
|
script-specific options and keyboard mappings in your .Xdefaults/.Xresources.
|
2010-08-13 15:19:52 -04:00
|
|
|
|
|
|
|
|
|
|
|
keyboard-select
|
|
|
|
---------------
|
|
|
|
Use keyboard shortcuts to select and copy text.
|
|
|
|
|
2011-05-28 06:52:44 -04:00
|
|
|
After installing, put the following lines in your .Xdefaults/.Xresources:
|
2010-08-13 15:19:52 -04:00
|
|
|
|
|
|
|
URxvt.perl-ext-common: ...,keyboard-select
|
|
|
|
URxvt.keysym.M-Escape: perl:keyboard-select:activate
|
|
|
|
|
2010-09-12 15:10:26 -04:00
|
|
|
The following line overwrites the default Meta-s binding and allows to activate
|
|
|
|
keyboard-select directly in backward search mode:
|
|
|
|
|
2011-09-07 03:12:11 -04:00
|
|
|
URxvt.keysym.M-s: perl:keyboard-select:search
|
2010-09-12 15:10:26 -04:00
|
|
|
|
2010-08-13 15:19:52 -04:00
|
|
|
Use Meta-Escape to activate selection mode, then use the following keys:
|
|
|
|
|
2010-08-18 05:11:37 -04:00
|
|
|
h/j/k/l: Move cursor left/down/up/right (also with arrow keys)
|
2010-11-29 13:30:49 -05:00
|
|
|
g/G/0/^/$/H/M/L/f/F/;/,/w/W/b/B/e/E: More vi-like cursor movement keys
|
2010-09-12 15:10:26 -04:00
|
|
|
'/'/?: Start forward/backward search
|
|
|
|
n/N: Repeat last search, N: in reverse direction
|
2010-08-18 19:05:35 -04:00
|
|
|
Ctrl-f/b: Scroll down/up one screen
|
|
|
|
Ctrl-d/u: Scroll down/up half a screen
|
2010-08-18 05:11:37 -04:00
|
|
|
v/V/Ctrl-v: Toggle normal/linewise/blockwise selection
|
|
|
|
y/Return: Copy selection to primary buffer, Return: deactivate afterwards
|
|
|
|
q/Escape: Deactivate keyboard selection mode
|
2010-08-13 15:19:52 -04:00
|
|
|
|
|
|
|
|
|
|
|
url-select
|
|
|
|
----------
|
|
|
|
Use keyboard shortcuts to select URLs.
|
|
|
|
|
|
|
|
This should be used as a replacement for the default matcher extension, it also
|
|
|
|
makes URLs clickable with the middle mouse button.
|
|
|
|
|
2011-05-28 06:52:44 -04:00
|
|
|
After installing, put the following lines in your .Xdefaults/.Xresources:
|
2010-08-13 15:19:52 -04:00
|
|
|
|
|
|
|
URxvt.perl-ext-common: ...,url-select
|
|
|
|
URxvt.keysym.M-u: perl:url-select:select_next
|
|
|
|
|
|
|
|
Use Meta-u to activate URL selection mode, then use the following keys:
|
|
|
|
|
2011-11-05 08:18:49 -04:00
|
|
|
j/k: Select next downward/upward URL (also with arrow keys)
|
|
|
|
g/G: Select first/last URL (also with home/end key)
|
2010-08-17 14:41:12 -04:00
|
|
|
o/Return: Open selected URL in browser, Return: deactivate afterwards
|
|
|
|
y: Copy (yank) selected URL and deactivate selection mode
|
|
|
|
q/Escape: Deactivate URL selection mode
|
2010-08-13 15:19:52 -04:00
|
|
|
|
|
|
|
Options:
|
|
|
|
|
2012-08-16 05:41:33 -04:00
|
|
|
URxvt.url-select.autocopy: if set to true, selected URLs are automatically
|
|
|
|
copied to the PRIMARY buffer
|
2012-12-20 08:55:41 -05:00
|
|
|
URxvt.url-select.button: mouse button to click-open URLs (default: 2)
|
2012-08-12 07:27:05 -04:00
|
|
|
URxvt.url-select.launcher: browser/command to open selected URL with
|
|
|
|
URxvt.url-select.underline: if set to true, all URLs get underlined
|
2010-08-13 15:19:52 -04:00
|
|
|
|
2012-07-10 15:57:03 -04:00
|
|
|
For compatibility reasons, url-select will also use any patterns defined for
|
|
|
|
the matcher extension by reading all `URxvt.matcher.pattern.[0-9]` resources.
|
|
|
|
|
2010-08-13 15:19:52 -04:00
|
|
|
|
|
|
|
clipboard
|
|
|
|
---------
|
|
|
|
Use keyboard shortcuts to copy the selection to the clipboard and to paste the
|
|
|
|
clipboard contents (optionally escaping all special characters).
|
|
|
|
|
2011-05-28 06:52:44 -04:00
|
|
|
After installing, put the following lines in your .Xdefaults/.Xresources:
|
2010-08-13 15:19:52 -04:00
|
|
|
|
2010-08-13 16:04:04 -04:00
|
|
|
URxvt.perl-ext-common: ...,clipboard
|
2010-08-13 15:19:52 -04:00
|
|
|
URxvt.keysym.M-c: perl:clipboard:copy
|
|
|
|
URxvt.keysym.M-v: perl:clipboard:paste
|
|
|
|
URxvt.keysym.M-C-v: perl:clipboard:paste_escaped
|
|
|
|
|
2012-10-28 08:58:40 -04:00
|
|
|
Options:
|
|
|
|
URxvt.clipboard.autocopy: if set to true, the clipboard is automatically
|
|
|
|
updated whenever the PRIMARY selection changes
|
|
|
|
|
2011-05-28 06:50:52 -04:00
|
|
|
You can also overwrite the system commands to use for copying/pasting.
|
|
|
|
The default ones are:
|
|
|
|
|
2012-08-16 05:41:33 -04:00
|
|
|
URxvt.clipboard.copycmd: xsel -ib
|
|
|
|
URxvt.clipboard.pastecmd: xsel -ob
|
2011-05-28 06:50:52 -04:00
|
|
|
|
2011-05-28 06:52:44 -04:00
|
|
|
If you prefer xclip, then put these lines in your .Xdefaults/.Xresources:
|
2011-05-28 06:50:52 -04:00
|
|
|
|
2012-08-16 05:41:33 -04:00
|
|
|
URxvt.clipboard.copycmd: xclip -i -selection clipboard
|
|
|
|
URxvt.clipboard.pastecmd: xclip -o -selection clipboard
|
2011-05-28 06:50:52 -04:00
|
|
|
|
2011-05-28 06:52:44 -04:00
|
|
|
On Mac OS X, put these lines in your .Xdefaults/.Xresources:
|
2011-05-28 06:50:52 -04:00
|
|
|
|
2012-08-16 05:41:33 -04:00
|
|
|
URxvt.clipboard.copycmd: pbcopy
|
|
|
|
URxvt.clipboard.pastecmd: pbpaste
|
2011-05-28 06:50:52 -04:00
|
|
|
|
2010-08-13 15:19:52 -04:00
|
|
|
The use of the functions should be self-explanatory!
|