Giter VIP home page Giter VIP logo

urxvt-perls's Introduction

A small collection of perl extensions for the rxvt-unicode terminal emulator.

Installation

Simply place the scripts you want to install in /usr/lib/urxvt/perl/ for system-wide availability or in ~/.urxvt/ext/ for user-only availability. You can also put them in a folder of your choice, but then you have to add this line to your .Xdefaults/.Xresources:

URxvt.perl-lib: /your/folder/

See the following sections for information on how to enable the scripts or set script-specific options and keyboard mappings in your .Xdefaults/.Xresources.

keyboard-select

Use keyboard shortcuts to select and copy text.

After installing, put the following lines in your .Xdefaults/.Xresources:

URxvt.perl-ext-common: ...,keyboard-select
URxvt.keysym.M-Escape: perl:keyboard-select:activate

The following line overwrites the default Meta-s binding and allows to activate keyboard-select directly in backward search mode:

URxvt.keysym.M-s: perl:keyboard-select:search

Use Meta-Escape to activate selection mode, then use the following keys:

h/j/k/l:    Move cursor left/down/up/right (also with arrow keys)
g/G/0/^/$/H/M/L/f/F/;/,/w/W/b/B/e/E: More vi-like cursor movement keys
'/'/?:      Start forward/backward search
n/N:        Repeat last search, N: in reverse direction
Ctrl-f/b:   Scroll down/up one screen
Ctrl-d/u:   Scroll down/up half a screen
v/V/Ctrl-v: Toggle normal/linewise/blockwise selection
y/Return:   Copy selection to primary buffer, Return: quit afterwards
Y:          Copy selected lines to primary buffer or cursor line and quit
q/Escape:   Quit keyboard selection mode

url-select

Use keyboard shortcuts to select URLs.

DEPRECATED

Since version 9.21 the matcher extension shipped with rxvt-unicode fully replaces this extension. The url-select:select_next action is provided by the matcher:select action. However, the matcher extension does not provide vi-like key bindings; it only uses the arrow and home/end keys.

This should be used as a replacement for the default matcher extension, it also makes URLs clickable with the middle mouse button.

After installing, put the following lines in your .Xdefaults/.Xresources:

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:

j/k:      Select next downward/upward URL (also with arrow keys)
g/G:      Select first/last URL (also with home/end key)
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

Options:

URxvt.url-select.autocopy:  if set to true, selected URLs are automatically
                            copied to the PRIMARY buffer
URxvt.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

For compatibility reasons, url-select will also use any patterns defined for the matcher extension by reading all URxvt.matcher.pattern.[0-9] resources.

clipboard

DEPRECATED

Since version 9.20 rxvt-unicode natively supports copying to and pasting from the CLIPBOARD buffer with the Ctrl-Meta-c and Ctrl-Meta-v key bindings. The clipboard.autocopy setting is provided by the selection_to_clipboard extension shipped with rxvt-unicode.

Use keyboard shortcuts to copy the selection to the clipboard and to paste the clipboard contents (optionally escaping all special characters).

After installing, put the following lines in your .Xdefaults/.Xresources:

URxvt.perl-ext-common: ...,clipboard
URxvt.keysym.M-c:   perl:clipboard:copy
URxvt.keysym.M-v:   perl:clipboard:paste
URxvt.keysym.M-C-v: perl:clipboard:paste_escaped

Options:

URxvt.clipboard.autocopy: if set to true, the clipboard is automatically
                          updated whenever the PRIMARY selection changes

You can also overwrite the system commands to use for copying/pasting. The default ones are:

URxvt.clipboard.copycmd:  xsel -ib
URxvt.clipboard.pastecmd: xsel -ob

If you prefer xclip, then put these lines in your .Xdefaults/.Xresources:

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.clipboard.copycmd:  pbcopy
URxvt.clipboard.pastecmd: pbpaste

The use of the functions should be self-explanatory!

urxvt-perls's People

Contributors

xyb3rt avatar vifon avatar seletskiy avatar ramok avatar meh avatar amosbird avatar baskerville avatar lvancrayelynghe avatar lamberta avatar nmeum avatar yath avatar smerrill avatar tim-smart avatar woky avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.