… | |
… | |
120 | <dd> |
120 | <dd> |
121 | <p>You can look at the source of the selection extension to see more |
121 | <p>You can look at the source of the selection extension to see more |
122 | interesting uses, such as parsing a line from beginning to end.</p> |
122 | interesting uses, such as parsing a line from beginning to end.</p> |
123 | </dd> |
123 | </dd> |
124 | <dd> |
124 | <dd> |
125 | <p>This extension also offers the following bindable keyboard command:</p> |
125 | <p>This extension also offers following bindable keyboard commands:</p> |
126 | </dd> |
126 | </dd> |
127 | <dl> |
127 | <dl> |
128 | <dt><strong><a name="item_rot13">rot13</a></strong><br /> |
128 | <dt><strong><a name="item_rot13">rot13</a></strong><br /> |
129 | </dt> |
129 | </dt> |
130 | <dd> |
130 | <dd> |
… | |
… | |
189 | <code>filename:number</code>, often seen in compiler messages, into <code>vi +$filename |
189 | <code>filename:number</code>, often seen in compiler messages, into <code>vi +$filename |
190 | $word</code>:</p> |
190 | $word</code>:</p> |
191 | </dd> |
191 | </dd> |
192 | <dd> |
192 | <dd> |
193 | <pre> |
193 | <pre> |
194 | URxvt.selection-autotransform.0: s/^(\\S+):(\\d+):?$/vi +$2 \\Q$1\\E\\x0d/</pre> |
194 | URxvt.selection-autotransform.0: s/^([^:[:space:]]+):(\\d+):?$/vi +$2 \\Q$1\\E\\x0d/</pre> |
195 | </dd> |
195 | </dd> |
196 | <dd> |
196 | <dd> |
197 | <p>And this example matches the same,but replaces it with vi-commands you can |
197 | <p>And this example matches the same,but replaces it with vi-commands you can |
198 | paste directly into your (vi :) editor:</p> |
198 | paste directly into your (vi :) editor:</p> |
199 | </dd> |
199 | </dd> |
200 | <dd> |
200 | <dd> |
201 | <pre> |
201 | <pre> |
202 | URxvt.selection-autotransform.0: s/^(S+):(d+):?$/\\x1b:e \\Q$1\\E\\x0d:$2\\x0d/</pre> |
202 | URxvt.selection-autotransform.0: s/^([^:[:space:]]+(\\d+):?$/\\x1b:e \\Q$1\\E\\x0d:$2\\x0d/</pre> |
203 | </dd> |
203 | </dd> |
204 | <dd> |
204 | <dd> |
205 | <p>Of course, this can be modified to suit your needs and your editor :)</p> |
205 | <p>Of course, this can be modified to suit your needs and your editor :)</p> |
|
|
206 | </dd> |
|
|
207 | <dd> |
|
|
208 | <p>To expand the example above to typical perl error messages (``XXX at |
|
|
209 | FILENAME line YYY.''), you need a slightly more elaborate solution:</p> |
|
|
210 | </dd> |
|
|
211 | <dd> |
|
|
212 | <pre> |
|
|
213 | URxvt.selection.pattern-0: ( at .*? line \\d+\\.) |
|
|
214 | URxvt.selection-autotransform.0: s/^ at (.*?) line (\\d+)\\.$/\x1b:e \\Q$1\E\\x0d:$2\\x0d/</pre> |
|
|
215 | </dd> |
|
|
216 | <dd> |
|
|
217 | <p>The first line tells the selection code to treat the unchanging part of |
|
|
218 | every error message as a selection pattern, and the second line transforms |
|
|
219 | the message into vi commands to load the file.</p> |
206 | </dd> |
220 | </dd> |
207 | <p></p> |
221 | <p></p> |
208 | <dt><strong><a name="item_mark_2durls">mark-urls</a></strong><br /> |
222 | <dt><strong><a name="item_mark_2durls">mark-urls</a></strong><br /> |
209 | </dt> |
223 | </dt> |
210 | <dd> |
224 | <dd> |
… | |
… | |
232 | </dt> |
246 | </dt> |
233 | <dd> |
247 | <dd> |
234 | Displays a very simple digital clock in the upper right corner of the |
248 | Displays a very simple digital clock in the upper right corner of the |
235 | window. Illustrates overwriting the refresh callbacks to create your own |
249 | window. Illustrates overwriting the refresh callbacks to create your own |
236 | overlays or changes. |
250 | overlays or changes. |
|
|
251 | </dd> |
|
|
252 | <p></p> |
|
|
253 | <dt><strong><a name="item_selection_2dpastebin">selection-pastebin</a></strong><br /> |
|
|
254 | </dt> |
|
|
255 | <dd> |
|
|
256 | This is a little rarely useful extension that Uploads the selection as |
|
|
257 | textfile to a remote site (or does other things). (The implementation is |
|
|
258 | not currently secure for use in a multiuser environment as it writes to |
|
|
259 | <em>/tmp</em> directly.). |
|
|
260 | </dd> |
|
|
261 | <dd> |
|
|
262 | <p>It listens to the <code>selection-pastebin:remote-pastebin</code> keyboard command, |
|
|
263 | i.e.</p> |
|
|
264 | </dd> |
|
|
265 | <dd> |
|
|
266 | <pre> |
|
|
267 | URxvt.keysym.C-M-e: perl:selection-pastebin:remote-pastebin</pre> |
|
|
268 | </dd> |
|
|
269 | <dd> |
|
|
270 | <p>Pressing this combination runs a command with <code>%</code> replaced by the name of |
|
|
271 | the textfile. This command can be set via a resource:</p> |
|
|
272 | </dd> |
|
|
273 | <dd> |
|
|
274 | <pre> |
|
|
275 | URxvt.selection-pastebin.cmd: rsync -apP % ruth:/var/www/www.ta-sa.org/files/txt/.</pre> |
|
|
276 | </dd> |
|
|
277 | <dd> |
|
|
278 | <p>And the default is likely not useful to anybody but the few people around |
|
|
279 | here :)</p> |
|
|
280 | </dd> |
|
|
281 | <dd> |
|
|
282 | <p>The name of the textfile is the hex encoded md5 sum of the selection, so |
|
|
283 | the same content should lead to the same filename.</p> |
|
|
284 | </dd> |
|
|
285 | <dd> |
|
|
286 | <p>After a successful upload the selection will be replaced by the text given |
|
|
287 | in the <code>selection-pastebin-url</code> resource (again, the % is the placeholder |
|
|
288 | for the filename):</p> |
|
|
289 | </dd> |
|
|
290 | <dd> |
|
|
291 | <pre> |
|
|
292 | URxvt.selection-pastebin.url: <a href="http://www.ta-sa.org/files/txt/%">http://www.ta-sa.org/files/txt/%</a></pre> |
237 | </dd> |
293 | </dd> |
238 | <p></p></dl> |
294 | <p></p></dl> |
239 | <p> |
295 | <p> |
240 | </p> |
296 | </p> |
241 | <hr /> |
297 | <hr /> |
… | |
… | |
478 | Called whenever the user presses a key combination that has a |
534 | Called whenever the user presses a key combination that has a |
479 | <code>perl:string</code> action bound to it (see description of the <strong>keysym</strong> |
535 | <code>perl:string</code> action bound to it (see description of the <strong>keysym</strong> |
480 | resource in the <code>rxvt(1)</code> manpage). |
536 | resource in the <code>rxvt(1)</code> manpage). |
481 | </dd> |
537 | </dd> |
482 | <p></p> |
538 | <p></p> |
|
|
539 | <dt><strong><a name="item_on_x_event__24term_2c__24event">on_x_event $term, $event</a></strong><br /> |
|
|
540 | </dt> |
|
|
541 | <dd> |
|
|
542 | Called on every X event received on the vt window (and possibly other |
|
|
543 | windows). Should only be used as a last resort. Most event structure |
|
|
544 | members are not passed. |
|
|
545 | </dd> |
|
|
546 | <p></p> |
483 | <dt><strong><a name="item_on_focus_in__24term">on_focus_in $term</a></strong><br /> |
547 | <dt><strong><a name="item_on_focus_in__24term">on_focus_in $term</a></strong><br /> |
484 | </dt> |
548 | </dt> |
485 | <dd> |
549 | <dd> |
486 | Called whenever the window gets the keyboard focus, before rxvt-unicode |
550 | Called whenever the window gets the keyboard focus, before rxvt-unicode |
487 | does focus in processing. |
551 | does focus in processing. |
… | |
… | |
580 | </dd> |
644 | </dd> |
581 | <dd> |
645 | <dd> |
582 | <p>Messages have a size limit of 1023 bytes currently.</p> |
646 | <p>Messages have a size limit of 1023 bytes currently.</p> |
583 | </dd> |
647 | </dd> |
584 | <p></p> |
648 | <p></p> |
585 | <dt><strong><a name="item__24is_safe__3d_urxvt_3a_3asafe">$is_safe = urxvt::safe</a></strong><br /> |
|
|
586 | </dt> |
|
|
587 | <dd> |
|
|
588 | Returns true when it is safe to do potentially unsafe things, such as |
|
|
589 | evaluating perl code specified by the user. This is true when urxvt was |
|
|
590 | started setuid or setgid. |
|
|
591 | </dd> |
|
|
592 | <p></p> |
|
|
593 | <dt><strong><a name="item__24time__3d_urxvt_3a_3anow">$time = urxvt::NOW</a></strong><br /> |
649 | <dt><strong><a name="item__24time__3d_urxvt_3a_3anow">$time = urxvt::NOW</a></strong><br /> |
594 | </dt> |
650 | </dt> |
595 | <dd> |
651 | <dd> |
596 | Returns the ``current time'' (as per the event loop). |
652 | Returns the ``current time'' (as per the event loop). |
597 | </dd> |
653 | </dd> |
… | |
… | |
599 | <dt><strong><a name="item_urxvt_3a_3acurrenttime">urxvt::CurrentTime</a></strong><br /> |
655 | <dt><strong><a name="item_urxvt_3a_3acurrenttime">urxvt::CurrentTime</a></strong><br /> |
600 | </dt> |
656 | </dt> |
601 | <dt><strong><a name="item_urxvt_3a_3ashiftmask_2c_lockmask_2c_controlmask_2c">urxvt::ShiftMask, LockMask, ControlMask, Mod1Mask, Mod2Mask, |
657 | <dt><strong><a name="item_urxvt_3a_3ashiftmask_2c_lockmask_2c_controlmask_2c">urxvt::ShiftMask, LockMask, ControlMask, Mod1Mask, Mod2Mask, |
602 | Mod3Mask, Mod4Mask, Mod5Mask, Button1Mask, Button2Mask, Button3Mask, |
658 | Mod3Mask, Mod4Mask, Mod5Mask, Button1Mask, Button2Mask, Button3Mask, |
603 | Button4Mask, Button5Mask, AnyModifier</a></strong><br /> |
659 | Button4Mask, Button5Mask, AnyModifier</a></strong><br /> |
|
|
660 | </dt> |
|
|
661 | <dt><strong><a name="item_urxvt_3a_3anoeventmask_2c_keypressmask_2c_keyrelea">urxvt::NoEventMask, KeyPressMask, KeyReleaseMask, |
|
|
662 | ButtonPressMask, ButtonReleaseMask, EnterWindowMask, LeaveWindowMask, |
|
|
663 | PointerMotionMask, PointerMotionHintMask, Button1MotionMask, Button2MotionMask, |
|
|
664 | Button3MotionMask, Button4MotionMask, Button5MotionMask, ButtonMotionMask, |
|
|
665 | KeymapStateMask, ExposureMask, VisibilityChangeMask, StructureNotifyMask, |
|
|
666 | ResizeRedirectMask, SubstructureNotifyMask, SubstructureRedirectMask, |
|
|
667 | FocusChangeMask, PropertyChangeMask, ColormapChangeMask, OwnerGrabButtonMask</a></strong><br /> |
|
|
668 | </dt> |
|
|
669 | <dt><strong><a name="item_urxvt_3a_3akeypress_2c_keyrelease_2c_buttonpress_2">urxvt::KeyPress, KeyRelease, ButtonPress, ButtonRelease, MotionNotify, |
|
|
670 | EnterNotify, LeaveNotify, FocusIn, FocusOut, KeymapNotify, Expose, |
|
|
671 | GraphicsExpose, NoExpose, VisibilityNotify, CreateNotify, DestroyNotify, |
|
|
672 | UnmapNotify, MapNotify, MapRequest, ReparentNotify, ConfigureNotify, |
|
|
673 | ConfigureRequest, GravityNotify, ResizeRequest, CirculateNotify, |
|
|
674 | CirculateRequest, PropertyNotify, SelectionClear, SelectionRequest, |
|
|
675 | SelectionNotify, ColormapNotify, ClientMessage, MappingNotify</a></strong><br /> |
604 | </dt> |
676 | </dt> |
605 | <dd> |
677 | <dd> |
606 | Various constants for use in X calls and event processing. |
678 | Various constants for use in X calls and event processing. |
607 | </dd> |
679 | </dd> |
608 | <p></p></dl> |
680 | <p></p></dl> |
… | |
… | |
983 | </dt> |
1055 | </dt> |
984 | <dd> |
1056 | <dd> |
985 | Return the window id of the terminal window. |
1057 | Return the window id of the terminal window. |
986 | </dd> |
1058 | </dd> |
987 | <p></p> |
1059 | <p></p> |
|
|
1060 | <dt><strong><a name="item_vt_emask_add">$term->vt_emask_add ($x_event_mask)</a></strong><br /> |
|
|
1061 | </dt> |
|
|
1062 | <dd> |
|
|
1063 | Adds the specified events to the vt event mask. Useful e.g. when you want |
|
|
1064 | to receive pointer events all the times: |
|
|
1065 | </dd> |
|
|
1066 | <dd> |
|
|
1067 | <pre> |
|
|
1068 | $term->vt_emask_add (urxvt::PointerMotionMask);</pre> |
|
|
1069 | </dd> |
|
|
1070 | <p></p> |
988 | <dt><strong><a name="item_width">$window_width = $term->width</a></strong><br /> |
1071 | <dt><strong><a name="item_width">$window_width = $term->width</a></strong><br /> |
989 | </dt> |
1072 | </dt> |
990 | <dt><strong><a name="item_height">$window_height = $term->height</a></strong><br /> |
1073 | <dt><strong><a name="item_height">$window_height = $term->height</a></strong><br /> |
991 | </dt> |
1074 | </dt> |
992 | <dt><strong><a name="item_fwidth">$font_width = $term->fwidth</a></strong><br /> |
1075 | <dt><strong><a name="item_fwidth">$font_width = $term->fwidth</a></strong><br /> |
… | |
… | |
1005 | </dt> |
1088 | </dt> |
1006 | <dt><strong><a name="item_savelines">$max_scrollback = $term->saveLines</a></strong><br /> |
1089 | <dt><strong><a name="item_savelines">$max_scrollback = $term->saveLines</a></strong><br /> |
1007 | </dt> |
1090 | </dt> |
1008 | <dt><strong><a name="item_total_rows">$nrow_plus_saveLines = $term->total_rows</a></strong><br /> |
1091 | <dt><strong><a name="item_total_rows">$nrow_plus_saveLines = $term->total_rows</a></strong><br /> |
1009 | </dt> |
1092 | </dt> |
1010 | <dt><strong><a name="item_nsaved">$lines_in_scrollback = $term->nsaved</a></strong><br /> |
1093 | <dt><strong><a name="item_top_row">$topmost_scrollback_row = $term->top_row</a></strong><br /> |
1011 | </dt> |
1094 | </dt> |
1012 | <dd> |
1095 | <dd> |
1013 | Return various integers describing terminal characteristics. |
1096 | Return various integers describing terminal characteristics. |
1014 | </dd> |
1097 | </dd> |
1015 | <p></p> |
1098 | <p></p> |
… | |
… | |
1044 | </dd> |
1127 | </dd> |
1045 | <p></p> |
1128 | <p></p> |
1046 | <dt><strong><a name="item_view_start">$view_start = $term->view_start ([$newvalue])</a></strong><br /> |
1129 | <dt><strong><a name="item_view_start">$view_start = $term->view_start ([$newvalue])</a></strong><br /> |
1047 | </dt> |
1130 | </dt> |
1048 | <dd> |
1131 | <dd> |
1049 | Returns the negative row number of the topmost line. Minimum value is |
1132 | Returns the row number of the topmost displayed line. Maximum value is |
1050 | <code>0</code>, which displays the normal terminal contents. Larger values scroll |
1133 | <code>0</code>, which displays the normal terminal contents. Lower values scroll |
1051 | this many lines into the scrollback buffer. |
1134 | this many lines into the scrollback buffer. |
1052 | </dd> |
1135 | </dd> |
1053 | <p></p> |
1136 | <p></p> |
1054 | <dt><strong><a name="item_want_refresh">$term->want_refresh</a></strong><br /> |
1137 | <dt><strong><a name="item_want_refresh">$term->want_refresh</a></strong><br /> |
1055 | </dt> |
1138 | </dt> |
… | |
… | |
1066 | </dt> |
1149 | </dt> |
1067 | <dd> |
1150 | <dd> |
1068 | Returns the text of the entire row with number <code>$row_number</code>. Row <code>0</code> |
1151 | Returns the text of the entire row with number <code>$row_number</code>. Row <code>0</code> |
1069 | is the topmost terminal line, row <code>$term->$ncol-1</code> is the bottommost |
1152 | is the topmost terminal line, row <code>$term->$ncol-1</code> is the bottommost |
1070 | terminal line. The scrollback buffer starts at line <code>-1</code> and extends to |
1153 | terminal line. The scrollback buffer starts at line <code>-1</code> and extends to |
1071 | line <a href="#item_nsaved"><code>-$term->nsaved</code></a>. Nothing will be returned if a nonexistent line |
1154 | line <code>-$term->nsaved</code>. Nothing will be returned if a nonexistent line |
1072 | is requested. |
1155 | is requested. |
1073 | </dd> |
1156 | </dd> |
1074 | <dd> |
1157 | <dd> |
1075 | <p>If <code>$new_text</code> is specified, it will replace characters in the current |
1158 | <p>If <code>$new_text</code> is specified, it will replace characters in the current |
1076 | line, starting at column <code>$start_col</code> (default <code>0</code>), which is useful |
1159 | line, starting at column <code>$start_col</code> (default <code>0</code>), which is useful |