… | |
… | |
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> |
131 | Rot-13 the selection when activated. Used via keyboard trigger: |
131 | Rot-13 the selection when activated. Used via keyboard trigger: |
132 | </dd> |
132 | </dd> |
133 | <dd> |
133 | <dd> |
134 | <pre> |
134 | <pre> |
135 | URxvt.keysym.C-M-r: perl:selection:rot13</pre> |
135 | URxvt.keysym.C-M-r: perl:selection:rot13</pre> |
|
|
136 | </dd> |
|
|
137 | <p></p> |
|
|
138 | <dt><strong><a name="item_remote_2dpastebin">remote-pastebin</a></strong><br /> |
|
|
139 | </dt> |
|
|
140 | <dd> |
|
|
141 | Upload the selection as textfile to a remote site. |
|
|
142 | </dd> |
|
|
143 | <dd> |
|
|
144 | <pre> |
|
|
145 | URxvt.keysym.C-M-e: perl:selection:remote-pastebin</pre> |
|
|
146 | </dd> |
|
|
147 | <dd> |
|
|
148 | <p>To set the command to upload the file set this resource:</p> |
|
|
149 | </dd> |
|
|
150 | <dd> |
|
|
151 | <pre> |
|
|
152 | URxvt.selection-pastebin-cmd: rsync -apP % ruth:/var/www/www.ta-sa.org/files/txt/.</pre> |
|
|
153 | </dd> |
|
|
154 | <dd> |
|
|
155 | <p>The % is the placeholder for the textfile. The name of the textfile is the hex encoded |
|
|
156 | md5 sum of the selection. |
|
|
157 | After an successful upload the selection will be replaced by the following url |
|
|
158 | (the % is the placeholder for the filename):</p> |
|
|
159 | </dd> |
|
|
160 | <dd> |
|
|
161 | <pre> |
|
|
162 | URxvt.selection-pastebin-url: <a href="http://www.ta-sa.org/files/txt/%">http://www.ta-sa.org/files/txt/%</a></pre> |
136 | </dd> |
163 | </dd> |
137 | <p></p></dl> |
164 | <p></p></dl> |
138 | <dt><strong><a name="item_popup">option-popup (enabled by default)</a></strong><br /> |
165 | <dt><strong><a name="item_popup">option-popup (enabled by default)</a></strong><br /> |
139 | </dt> |
166 | </dt> |
140 | <dd> |
167 | <dd> |
… | |
… | |
189 | <code>filename:number</code>, often seen in compiler messages, into <code>vi +$filename |
216 | <code>filename:number</code>, often seen in compiler messages, into <code>vi +$filename |
190 | $word</code>:</p> |
217 | $word</code>:</p> |
191 | </dd> |
218 | </dd> |
192 | <dd> |
219 | <dd> |
193 | <pre> |
220 | <pre> |
194 | URxvt.selection-autotransform.0: s/^(\\S+):(\\d+):?$/vi +$2 \\Q$1\\E\\x0d/</pre> |
221 | URxvt.selection-autotransform.0: s/^([^:[:space:]]+):(\\d+):?$/vi +$2 \\Q$1\\E\\x0d/</pre> |
195 | </dd> |
222 | </dd> |
196 | <dd> |
223 | <dd> |
197 | <p>And this example matches the same,but replaces it with vi-commands you can |
224 | <p>And this example matches the same,but replaces it with vi-commands you can |
198 | paste directly into your (vi :) editor:</p> |
225 | paste directly into your (vi :) editor:</p> |
199 | </dd> |
226 | </dd> |
200 | <dd> |
227 | <dd> |
201 | <pre> |
228 | <pre> |
202 | URxvt.selection-autotransform.0: s/^(S+):(d+):?$/\\x1b:e \\Q$1\\E\\x0d:$2\\x0d/</pre> |
229 | URxvt.selection-autotransform.0: s/^([^:[:space:]]+(\\d+):?$/\\x1b:e \\Q$1\\E\\x0d:$2\\x0d/</pre> |
|
|
230 | </dd> |
|
|
231 | <dd> |
|
|
232 | <p>Of course, this can be modified to suit your needs and your editor :)</p> |
|
|
233 | </dd> |
|
|
234 | <dd> |
|
|
235 | <p>To expand the example above to typical perl error messages (``XXX at |
|
|
236 | FILENAME line YYY.''), you need a slightly more elaborate solution:</p> |
|
|
237 | </dd> |
|
|
238 | <dd> |
|
|
239 | <pre> |
|
|
240 | URxvt.selection.pattern-0: ( at .*? line \\d+\\.) |
|
|
241 | URxvt.selection-autotransform.0: s/^ at (.*?) line (\\d+)\\.$/\x1b:e \\Q$1\E\\x0d:$2\\x0d/</pre> |
|
|
242 | </dd> |
|
|
243 | <dd> |
|
|
244 | <p>The first line tells the selection code to treat the unchanging part of |
|
|
245 | every error message as a selection pattern, and the second line transforms |
|
|
246 | the message into vi commands to load the file.</p> |
203 | </dd> |
247 | </dd> |
204 | <p></p> |
248 | <p></p> |
205 | <dt><strong><a name="item_mark_2durls">mark-urls</a></strong><br /> |
249 | <dt><strong><a name="item_mark_2durls">mark-urls</a></strong><br /> |
206 | </dt> |
250 | </dt> |
207 | <dd> |
251 | <dd> |
… | |
… | |
475 | Called whenever the user presses a key combination that has a |
519 | Called whenever the user presses a key combination that has a |
476 | <code>perl:string</code> action bound to it (see description of the <strong>keysym</strong> |
520 | <code>perl:string</code> action bound to it (see description of the <strong>keysym</strong> |
477 | resource in the <code>rxvt(1)</code> manpage). |
521 | resource in the <code>rxvt(1)</code> manpage). |
478 | </dd> |
522 | </dd> |
479 | <p></p> |
523 | <p></p> |
|
|
524 | <dt><strong><a name="item_on_x_event__24term_2c__24event">on_x_event $term, $event</a></strong><br /> |
|
|
525 | </dt> |
|
|
526 | <dd> |
|
|
527 | Called on every X event received on the vt window (and possibly other |
|
|
528 | windows). Should only be used as a last resort. Most event structure |
|
|
529 | members are not passed. |
|
|
530 | </dd> |
|
|
531 | <p></p> |
480 | <dt><strong><a name="item_on_focus_in__24term">on_focus_in $term</a></strong><br /> |
532 | <dt><strong><a name="item_on_focus_in__24term">on_focus_in $term</a></strong><br /> |
481 | </dt> |
533 | </dt> |
482 | <dd> |
534 | <dd> |
483 | Called whenever the window gets the keyboard focus, before rxvt-unicode |
535 | Called whenever the window gets the keyboard focus, before rxvt-unicode |
484 | does focus in processing. |
536 | does focus in processing. |
… | |
… | |
577 | </dd> |
629 | </dd> |
578 | <dd> |
630 | <dd> |
579 | <p>Messages have a size limit of 1023 bytes currently.</p> |
631 | <p>Messages have a size limit of 1023 bytes currently.</p> |
580 | </dd> |
632 | </dd> |
581 | <p></p> |
633 | <p></p> |
582 | <dt><strong><a name="item__24is_safe__3d_urxvt_3a_3asafe">$is_safe = urxvt::safe</a></strong><br /> |
|
|
583 | </dt> |
|
|
584 | <dd> |
|
|
585 | Returns true when it is safe to do potentially unsafe things, such as |
|
|
586 | evaluating perl code specified by the user. This is true when urxvt was |
|
|
587 | started setuid or setgid. |
|
|
588 | </dd> |
|
|
589 | <p></p> |
|
|
590 | <dt><strong><a name="item__24time__3d_urxvt_3a_3anow">$time = urxvt::NOW</a></strong><br /> |
634 | <dt><strong><a name="item__24time__3d_urxvt_3a_3anow">$time = urxvt::NOW</a></strong><br /> |
591 | </dt> |
635 | </dt> |
592 | <dd> |
636 | <dd> |
593 | Returns the ``current time'' (as per the event loop). |
637 | Returns the ``current time'' (as per the event loop). |
594 | </dd> |
638 | </dd> |
… | |
… | |
596 | <dt><strong><a name="item_urxvt_3a_3acurrenttime">urxvt::CurrentTime</a></strong><br /> |
640 | <dt><strong><a name="item_urxvt_3a_3acurrenttime">urxvt::CurrentTime</a></strong><br /> |
597 | </dt> |
641 | </dt> |
598 | <dt><strong><a name="item_urxvt_3a_3ashiftmask_2c_lockmask_2c_controlmask_2c">urxvt::ShiftMask, LockMask, ControlMask, Mod1Mask, Mod2Mask, |
642 | <dt><strong><a name="item_urxvt_3a_3ashiftmask_2c_lockmask_2c_controlmask_2c">urxvt::ShiftMask, LockMask, ControlMask, Mod1Mask, Mod2Mask, |
599 | Mod3Mask, Mod4Mask, Mod5Mask, Button1Mask, Button2Mask, Button3Mask, |
643 | Mod3Mask, Mod4Mask, Mod5Mask, Button1Mask, Button2Mask, Button3Mask, |
600 | Button4Mask, Button5Mask, AnyModifier</a></strong><br /> |
644 | Button4Mask, Button5Mask, AnyModifier</a></strong><br /> |
|
|
645 | </dt> |
|
|
646 | <dt><strong><a name="item_urxvt_3a_3anoeventmask_2c_keypressmask_2c_keyrelea">urxvt::NoEventMask, KeyPressMask, KeyReleaseMask, |
|
|
647 | ButtonPressMask, ButtonReleaseMask, EnterWindowMask, LeaveWindowMask, |
|
|
648 | PointerMotionMask, PointerMotionHintMask, Button1MotionMask, Button2MotionMask, |
|
|
649 | Button3MotionMask, Button4MotionMask, Button5MotionMask, ButtonMotionMask, |
|
|
650 | KeymapStateMask, ExposureMask, VisibilityChangeMask, StructureNotifyMask, |
|
|
651 | ResizeRedirectMask, SubstructureNotifyMask, SubstructureRedirectMask, |
|
|
652 | FocusChangeMask, PropertyChangeMask, ColormapChangeMask, OwnerGrabButtonMask</a></strong><br /> |
|
|
653 | </dt> |
|
|
654 | <dt><strong><a name="item_urxvt_3a_3akeypress_2c_keyrelease_2c_buttonpress_2">urxvt::KeyPress, KeyRelease, ButtonPress, ButtonRelease, MotionNotify, |
|
|
655 | EnterNotify, LeaveNotify, FocusIn, FocusOut, KeymapNotify, Expose, |
|
|
656 | GraphicsExpose, NoExpose, VisibilityNotify, CreateNotify, DestroyNotify, |
|
|
657 | UnmapNotify, MapNotify, MapRequest, ReparentNotify, ConfigureNotify, |
|
|
658 | ConfigureRequest, GravityNotify, ResizeRequest, CirculateNotify, |
|
|
659 | CirculateRequest, PropertyNotify, SelectionClear, SelectionRequest, |
|
|
660 | SelectionNotify, ColormapNotify, ClientMessage, MappingNotify</a></strong><br /> |
601 | </dt> |
661 | </dt> |
602 | <dd> |
662 | <dd> |
603 | Various constants for use in X calls and event processing. |
663 | Various constants for use in X calls and event processing. |
604 | </dd> |
664 | </dd> |
605 | <p></p></dl> |
665 | <p></p></dl> |
… | |
… | |
980 | </dt> |
1040 | </dt> |
981 | <dd> |
1041 | <dd> |
982 | Return the window id of the terminal window. |
1042 | Return the window id of the terminal window. |
983 | </dd> |
1043 | </dd> |
984 | <p></p> |
1044 | <p></p> |
|
|
1045 | <dt><strong><a name="item_vt_emask_add">$term->vt_emask_add ($x_event_mask)</a></strong><br /> |
|
|
1046 | </dt> |
|
|
1047 | <dd> |
|
|
1048 | Adds the specified events to the vt event mask. Useful e.g. when you want |
|
|
1049 | to receive pointer events all the times: |
|
|
1050 | </dd> |
|
|
1051 | <dd> |
|
|
1052 | <pre> |
|
|
1053 | $term->vt_emask_add (urxvt::PointerMotionMask);</pre> |
|
|
1054 | </dd> |
|
|
1055 | <p></p> |
985 | <dt><strong><a name="item_width">$window_width = $term->width</a></strong><br /> |
1056 | <dt><strong><a name="item_width">$window_width = $term->width</a></strong><br /> |
986 | </dt> |
1057 | </dt> |
987 | <dt><strong><a name="item_height">$window_height = $term->height</a></strong><br /> |
1058 | <dt><strong><a name="item_height">$window_height = $term->height</a></strong><br /> |
988 | </dt> |
1059 | </dt> |
989 | <dt><strong><a name="item_fwidth">$font_width = $term->fwidth</a></strong><br /> |
1060 | <dt><strong><a name="item_fwidth">$font_width = $term->fwidth</a></strong><br /> |
… | |
… | |
1002 | </dt> |
1073 | </dt> |
1003 | <dt><strong><a name="item_savelines">$max_scrollback = $term->saveLines</a></strong><br /> |
1074 | <dt><strong><a name="item_savelines">$max_scrollback = $term->saveLines</a></strong><br /> |
1004 | </dt> |
1075 | </dt> |
1005 | <dt><strong><a name="item_total_rows">$nrow_plus_saveLines = $term->total_rows</a></strong><br /> |
1076 | <dt><strong><a name="item_total_rows">$nrow_plus_saveLines = $term->total_rows</a></strong><br /> |
1006 | </dt> |
1077 | </dt> |
1007 | <dt><strong><a name="item_nsaved">$lines_in_scrollback = $term->nsaved</a></strong><br /> |
1078 | <dt><strong><a name="item_top_row">$topmost_scrollback_row = $term->top_row</a></strong><br /> |
1008 | </dt> |
1079 | </dt> |
1009 | <dd> |
1080 | <dd> |
1010 | Return various integers describing terminal characteristics. |
1081 | Return various integers describing terminal characteristics. |
1011 | </dd> |
1082 | </dd> |
1012 | <p></p> |
1083 | <p></p> |
… | |
… | |
1041 | </dd> |
1112 | </dd> |
1042 | <p></p> |
1113 | <p></p> |
1043 | <dt><strong><a name="item_view_start">$view_start = $term->view_start ([$newvalue])</a></strong><br /> |
1114 | <dt><strong><a name="item_view_start">$view_start = $term->view_start ([$newvalue])</a></strong><br /> |
1044 | </dt> |
1115 | </dt> |
1045 | <dd> |
1116 | <dd> |
1046 | Returns the negative row number of the topmost line. Minimum value is |
1117 | Returns the row number of the topmost displayed line. Maximum value is |
1047 | <code>0</code>, which displays the normal terminal contents. Larger values scroll |
1118 | <code>0</code>, which displays the normal terminal contents. Lower values scroll |
1048 | this many lines into the scrollback buffer. |
1119 | this many lines into the scrollback buffer. |
1049 | </dd> |
1120 | </dd> |
1050 | <p></p> |
1121 | <p></p> |
1051 | <dt><strong><a name="item_want_refresh">$term->want_refresh</a></strong><br /> |
1122 | <dt><strong><a name="item_want_refresh">$term->want_refresh</a></strong><br /> |
1052 | </dt> |
1123 | </dt> |
… | |
… | |
1063 | </dt> |
1134 | </dt> |
1064 | <dd> |
1135 | <dd> |
1065 | Returns the text of the entire row with number <code>$row_number</code>. Row <code>0</code> |
1136 | Returns the text of the entire row with number <code>$row_number</code>. Row <code>0</code> |
1066 | is the topmost terminal line, row <code>$term->$ncol-1</code> is the bottommost |
1137 | is the topmost terminal line, row <code>$term->$ncol-1</code> is the bottommost |
1067 | terminal line. The scrollback buffer starts at line <code>-1</code> and extends to |
1138 | terminal line. The scrollback buffer starts at line <code>-1</code> and extends to |
1068 | line <a href="#item_nsaved"><code>-$term->nsaved</code></a>. Nothing will be returned if a nonexistent line |
1139 | line <code>-$term->nsaved</code>. Nothing will be returned if a nonexistent line |
1069 | is requested. |
1140 | is requested. |
1070 | </dd> |
1141 | </dd> |
1071 | <dd> |
1142 | <dd> |
1072 | <p>If <code>$new_text</code> is specified, it will replace characters in the current |
1143 | <p>If <code>$new_text</code> is specified, it will replace characters in the current |
1073 | line, starting at column <code>$start_col</code> (default <code>0</code>), which is useful |
1144 | line, starting at column <code>$start_col</code> (default <code>0</code>), which is useful |