… | |
… | |
57 | must contain at least one pair of capturing parentheses, which will |
57 | must contain at least one pair of capturing parentheses, which will |
58 | be used for the match. For example, the followign adds a regex that |
58 | be used for the match. For example, the followign adds a regex that |
59 | matches everything between two vertical bars: |
59 | matches everything between two vertical bars: |
60 | |
60 | |
61 | URxvt.selection.pattern-0: \\|([^|]+)\\| |
61 | URxvt.selection.pattern-0: \\|([^|]+)\\| |
|
|
62 | |
|
|
63 | Another example: Programs I use often output "absolute path: " at |
|
|
64 | the beginning of a line when they process multiple files. The |
|
|
65 | following pattern matches the filename (note, there is a single |
|
|
66 | space at the very end): |
|
|
67 | |
|
|
68 | URxvt.selection.pattern-0: ^(/[^:]+):\ |
62 | |
69 | |
63 | You can look at the source of the selection extension to see more |
70 | You can look at the source of the selection extension to see more |
64 | interesting uses, such as parsing a line from beginning to end. |
71 | interesting uses, such as parsing a line from beginning to end. |
65 | |
72 | |
66 | This extension also offers following bindable keyboard commands: |
73 | This extension also offers following bindable keyboard commands: |
… | |
… | |
182 | Uses per-line display filtering ("on_line_update") to underline urls |
189 | Uses per-line display filtering ("on_line_update") to underline urls |
183 | and make them clickable. When middle-clicked, the program specified |
190 | and make them clickable. When middle-clicked, the program specified |
184 | in the resource "urlLauncher" (default "x-www-browser") will be |
191 | in the resource "urlLauncher" (default "x-www-browser") will be |
185 | started with the URL as first argument. |
192 | started with the URL as first argument. |
186 | |
193 | |
|
|
194 | xim-onthespot |
|
|
195 | This (experimental) perl extension implements OnTheSpot editing. It |
|
|
196 | does not work perfectly, and some input methods don't seem to work |
|
|
197 | well with OnTheSpot editing in general, but it seems to work at |
|
|
198 | leats for SCIM and kinput2. |
|
|
199 | |
|
|
200 | You enable it by specifying this extension and a preedit style of |
|
|
201 | "OnTheSpot", i.e.: |
|
|
202 | |
|
|
203 | rxvt -pt OnTheSpot -pe xim-onthespot |
|
|
204 | |
187 | automove-background |
205 | automove-background |
188 | This is basically a one-line extension that dynamically changes the |
206 | This is basically a one-line extension that dynamically changes the |
189 | background pixmap offset to the window position, in effect creating |
207 | background pixmap offset to the window position, in effect creating |
190 | the same effect as pseudo transparency with a custom pixmap. No |
208 | the same effect as pseudo transparency with a custom pixmap. No |
191 | scaling is supported in this mode. Exmaple: |
209 | scaling is supported in this mode. Exmaple: |
… | |
… | |
198 | U+259F) by a similar-looking ascii character. |
216 | U+259F) by a similar-looking ascii character. |
199 | |
217 | |
200 | digital-clock |
218 | digital-clock |
201 | Displays a digital clock using the built-in overlay. |
219 | Displays a digital clock using the built-in overlay. |
202 | |
220 | |
203 | example-refresh-hooks |
221 | remote-clipboard |
204 | Displays a very simple digital clock in the upper right corner of |
222 | Somewhat of a misnomer, this extension adds two menu entries to the |
205 | the window. Illustrates overwriting the refresh callbacks to create |
223 | selection popup that allows one ti run external commands to store |
206 | your own overlays or changes. |
224 | the selection somewhere and fetch it again. |
|
|
225 | |
|
|
226 | We use it to implement a "distributed selection mechanism", which |
|
|
227 | just means that one command uploads the file to a remote server, and |
|
|
228 | another reads it. |
|
|
229 | |
|
|
230 | The commands can be set using the "URxvt.remote-selection.store" and |
|
|
231 | "URxvt.remote-selection.fetch" resources. The first should read the |
|
|
232 | selection to store from STDIN (always in UTF-8), the second should |
|
|
233 | provide the selection data on STDOUT (also in UTF-8). |
|
|
234 | |
|
|
235 | The defaults (which are likely useless to you) use rsh and cat: |
|
|
236 | |
|
|
237 | URxvt.remote-selection.store: rsh ruth 'cat >/tmp/distributed-selection' |
|
|
238 | URxvt.remote-selection.fetch: rsh ruth 'cat /tmp/distributed-selection' |
207 | |
239 | |
208 | selection-pastebin |
240 | selection-pastebin |
209 | This is a little rarely useful extension that Uploads the selection |
241 | This is a little rarely useful extension that Uploads the selection |
210 | as textfile to a remote site (or does other things). (The |
242 | as textfile to a remote site (or does other things). (The |
211 | implementation is not currently secure for use in a multiuser |
243 | implementation is not currently secure for use in a multiuser |
… | |
… | |
230 | After a successful upload the selection will be replaced by the text |
262 | After a successful upload the selection will be replaced by the text |
231 | given in the "selection-pastebin-url" resource (again, the % is the |
263 | given in the "selection-pastebin-url" resource (again, the % is the |
232 | placeholder for the filename): |
264 | placeholder for the filename): |
233 | |
265 | |
234 | URxvt.selection-pastebin.url: http://www.ta-sa.org/files/txt/% |
266 | URxvt.selection-pastebin.url: http://www.ta-sa.org/files/txt/% |
|
|
267 | |
|
|
268 | example-refresh-hooks |
|
|
269 | Displays a very simple digital clock in the upper right corner of |
|
|
270 | the window. Illustrates overwriting the refresh callbacks to create |
|
|
271 | your own overlays or changes. |
235 | |
272 | |
236 | API DOCUMENTATION |
273 | API DOCUMENTATION |
237 | General API Considerations |
274 | General API Considerations |
238 | All objects (such as terminals, time watchers etc.) are typical |
275 | All objects (such as terminals, time watchers etc.) are typical |
239 | reference-to-hash objects. The hash can be used to store anything you |
276 | reference-to-hash objects. The hash can be used to store anything you |
… | |
… | |
313 | Called at the very end of initialisation of a new terminal, just |
350 | Called at the very end of initialisation of a new terminal, just |
314 | before trying to map (display) the toplevel and returning to the |
351 | before trying to map (display) the toplevel and returning to the |
315 | mainloop. |
352 | mainloop. |
316 | |
353 | |
317 | on_destroy $term |
354 | on_destroy $term |
318 | Called whenever something tries to destroy terminal, before doing |
355 | Called whenever something tries to destroy terminal, when the |
319 | anything yet. If this hook returns true, then destruction is |
356 | terminal is still fully functional (not for long, though). |
320 | skipped, but this is rarely a good idea. |
|
|
321 | |
357 | |
322 | on_reset $term |
358 | on_reset $term |
323 | Called after the screen is "reset" for any reason, such as resizing |
359 | Called after the screen is "reset" for any reason, such as resizing |
324 | or control sequences. Here is where you can react on changes to |
360 | or control sequences. Here is where you can react on changes to |
325 | size-related variables. |
361 | size-related variables. |
… | |
… | |
417 | display code is run after this hook, and takes precedence. |
453 | display code is run after this hook, and takes precedence. |
418 | |
454 | |
419 | on_refresh_end $term |
455 | on_refresh_end $term |
420 | Called just after the screen gets redrawn. See "on_refresh_begin". |
456 | Called just after the screen gets redrawn. See "on_refresh_begin". |
421 | |
457 | |
422 | on_keyboard_command $term, $string |
458 | on_user_command $term, $string |
423 | Called whenever the user presses a key combination that has a |
459 | Called whenever the a user-configured event is being activated (e.g. |
424 | "perl:string" action bound to it (see description of the keysym |
460 | via a "perl:string" action bound to a key, see description of the |
425 | resource in the rxvt(1) manpage). |
461 | keysym resource in the rxvt(1) manpage). |
|
|
462 | |
|
|
463 | The event is simply the action string. This interface is assumed to |
|
|
464 | change slightly in the future. |
426 | |
465 | |
427 | on_x_event $term, $event |
466 | on_x_event $term, $event |
428 | Called on every X event received on the vt window (and possibly |
467 | Called on every X event received on the vt window (and possibly |
429 | other windows). Should only be used as a last resort. Most event |
468 | other windows). Should only be used as a last resort. Most event |
430 | structure members are not passed. |
469 | structure members are not passed. |