… | |
… | |
66 | contain at least one pair of capturing parentheses, which will be used for |
66 | contain at least one pair of capturing parentheses, which will be used for |
67 | the match. For example, the followign adds a regex that matches everything |
67 | the match. For example, the followign adds a regex that matches everything |
68 | between two vertical bars: |
68 | between two vertical bars: |
69 | |
69 | |
70 | URxvt.selection.pattern-0: \\|([^|]+)\\| |
70 | URxvt.selection.pattern-0: \\|([^|]+)\\| |
|
|
71 | |
|
|
72 | Another example: Programs I use often output "absolute path: " at the |
|
|
73 | beginning of a line when they process multiple files. The following |
|
|
74 | pattern matches the filename (note, there is a single space at the very |
|
|
75 | end): |
|
|
76 | |
|
|
77 | URxvt.selection.pattern-0: ^(/[^:]+):\ |
71 | |
78 | |
72 | You can look at the source of the selection extension to see more |
79 | You can look at the source of the selection extension to see more |
73 | interesting uses, such as parsing a line from beginning to end. |
80 | interesting uses, such as parsing a line from beginning to end. |
74 | |
81 | |
75 | This extension also offers following bindable keyboard commands: |
82 | This extension also offers following bindable keyboard commands: |
… | |
… | |
139 | |
146 | |
140 | To avoid too many false positives, this is only done when: |
147 | To avoid too many false positives, this is only done when: |
141 | |
148 | |
142 | =over 4 |
149 | =over 4 |
143 | |
150 | |
|
|
151 | =item - the tty is in ICANON state. |
|
|
152 | |
|
|
153 | =item - the text cursor is visible. |
|
|
154 | |
|
|
155 | =item - the primary screen is currently being displayed. |
|
|
156 | |
144 | =item - the mouse is on the same (multi-row-) line as the text cursor. |
157 | =item - the mouse is on the same (multi-row-) line as the text cursor. |
145 | |
|
|
146 | =item - the primary screen is currently being displayed. |
|
|
147 | |
|
|
148 | =item - the text cursor is visible. |
|
|
149 | |
158 | |
150 | =back |
159 | =back |
151 | |
160 | |
152 | The normal selection mechanism isn't disabled, so quick successive clicks |
161 | The normal selection mechanism isn't disabled, so quick successive clicks |
153 | might interfere with selection creation in harmless ways. |
162 | might interfere with selection creation in harmless ways. |
… | |
… | |
361 | Called at the very end of initialisation of a new terminal, just before |
370 | Called at the very end of initialisation of a new terminal, just before |
362 | trying to map (display) the toplevel and returning to the mainloop. |
371 | trying to map (display) the toplevel and returning to the mainloop. |
363 | |
372 | |
364 | =item on_destroy $term |
373 | =item on_destroy $term |
365 | |
374 | |
366 | Called whenever something tries to destroy terminal, before doing anything |
375 | Called whenever something tries to destroy terminal, when the terminal is |
367 | yet. If this hook returns true, then destruction is skipped, but this is |
376 | still fully functional (not for long, though). |
368 | rarely a good idea. |
|
|
369 | |
377 | |
370 | =item on_reset $term |
378 | =item on_reset $term |
371 | |
379 | |
372 | Called after the screen is "reset" for any reason, such as resizing or |
380 | Called after the screen is "reset" for any reason, such as resizing or |
373 | control sequences. Here is where you can react on changes to size-related |
381 | control sequences. Here is where you can react on changes to size-related |
… | |
… | |
1310 | Replaces the event mask of the pty watcher by the given event mask. Can |
1318 | Replaces the event mask of the pty watcher by the given event mask. Can |
1311 | be used to suppress input and output handling to the pty/tty. See the |
1319 | be used to suppress input and output handling to the pty/tty. See the |
1312 | description of C<< urxvt::timer->events >>. Make sure to always restore |
1320 | description of C<< urxvt::timer->events >>. Make sure to always restore |
1313 | the previous value. |
1321 | the previous value. |
1314 | |
1322 | |
|
|
1323 | =item $fd = $term->pty_fd |
|
|
1324 | |
|
|
1325 | Returns the master file descriptor for the pty in use, or C<-1> if no pty |
|
|
1326 | is used. |
|
|
1327 | |
1315 | =item $windowid = $term->parent |
1328 | =item $windowid = $term->parent |
1316 | |
1329 | |
1317 | Return the window id of the toplevel window. |
1330 | Return the window id of the toplevel window. |
1318 | |
1331 | |
1319 | =item $windowid = $term->vt |
1332 | =item $windowid = $term->vt |