… | |
… | |
103 | |
103 | |
104 | For example, the following will transform selections of the form |
104 | For example, the following will transform selections of the form |
105 | "filename:number", often seen in compiler messages, into "vi |
105 | "filename:number", often seen in compiler messages, into "vi |
106 | +$filename $word": |
106 | +$filename $word": |
107 | |
107 | |
108 | URxvt.selection-autotransform.0: s/^(\\S+):(\\d+):?$/vi +$2 \\Q$1\\E\\x0d/ |
108 | URxvt.selection-autotransform.0: s/^([^:[:space:]]+):(\\d+):?$/vi +$2 \\Q$1\\E\\x0d/ |
109 | |
109 | |
110 | And this example matches the same,but replaces it with vi-commands |
110 | And this example matches the same,but replaces it with vi-commands |
111 | you can paste directly into your (vi :) editor: |
111 | you can paste directly into your (vi :) editor: |
112 | |
112 | |
113 | URxvt.selection-autotransform.0: s/^(S+):(d+):?$/\\x1b:e \\Q$1\\E\\x0d:$2\\x0d/ |
113 | URxvt.selection-autotransform.0: s/^([^:[:space:]]+(\\d+):?$/\\x1b:e \\Q$1\\E\\x0d:$2\\x0d/ |
114 | |
114 | |
115 | Of course, this can be modified to suit your needs and your editor |
115 | Of course, this can be modified to suit your needs and your editor |
116 | :) |
116 | :) |
|
|
117 | |
|
|
118 | To expand the example above to typical perl error messages ("XXX at |
|
|
119 | FILENAME line YYY."), you need a slightly more elaborate solution: |
|
|
120 | |
|
|
121 | URxvt.selection.pattern-0: ( at .*? line \\d+\\.) |
|
|
122 | URxvt.selection-autotransform.0: s/^ at (.*?) line (\\d+)\\.$/\x1b:e \\Q$1\E\\x0d:$2\\x0d/ |
|
|
123 | |
|
|
124 | The first line tells the selection code to treat the unchanging part |
|
|
125 | of every error message as a selection pattern, and the second line |
|
|
126 | transforms the message into vi commands to load the file. |
117 | |
127 | |
118 | mark-urls |
128 | mark-urls |
119 | Uses per-line display filtering ("on_line_update") to underline urls |
129 | Uses per-line display filtering ("on_line_update") to underline urls |
120 | and make them clickable. When middle-clicked, the program specified |
130 | and make them clickable. When middle-clicked, the program specified |
121 | in the resource "urlLauncher" (default "x-www-browser") will be |
131 | in the resource "urlLauncher" (default "x-www-browser") will be |
… | |
… | |
309 | |
319 | |
310 | on_keyboard_command $term, $string |
320 | on_keyboard_command $term, $string |
311 | Called whenever the user presses a key combination that has a |
321 | Called whenever the user presses a key combination that has a |
312 | "perl:string" action bound to it (see description of the keysym |
322 | "perl:string" action bound to it (see description of the keysym |
313 | resource in the rxvt(1) manpage). |
323 | resource in the rxvt(1) manpage). |
|
|
324 | |
|
|
325 | on_x_event $term, $event |
|
|
326 | Called on every X event received on the vt window (and possibly |
|
|
327 | other windows). Should only be used as a last resort. Most event |
|
|
328 | structure members are not passed. |
314 | |
329 | |
315 | on_focus_in $term |
330 | on_focus_in $term |
316 | Called whenever the window gets the keyboard focus, before |
331 | Called whenever the window gets the keyboard focus, before |
317 | rxvt-unicode does focus in processing. |
332 | rxvt-unicode does focus in processing. |
318 | |
333 | |
… | |
… | |
382 | |
397 | |
383 | urxvt::CurrentTime |
398 | urxvt::CurrentTime |
384 | urxvt::ShiftMask, LockMask, ControlMask, Mod1Mask, Mod2Mask, Mod3Mask, |
399 | urxvt::ShiftMask, LockMask, ControlMask, Mod1Mask, Mod2Mask, Mod3Mask, |
385 | Mod4Mask, Mod5Mask, Button1Mask, Button2Mask, Button3Mask, Button4Mask, |
400 | Mod4Mask, Mod5Mask, Button1Mask, Button2Mask, Button3Mask, Button4Mask, |
386 | Button5Mask, AnyModifier |
401 | Button5Mask, AnyModifier |
|
|
402 | urxvt::NoEventMask, KeyPressMask, KeyReleaseMask, ButtonPressMask, |
|
|
403 | ButtonReleaseMask, EnterWindowMask, LeaveWindowMask, PointerMotionMask, |
|
|
404 | PointerMotionHintMask, Button1MotionMask, Button2MotionMask, |
|
|
405 | Button3MotionMask, Button4MotionMask, Button5MotionMask, |
|
|
406 | ButtonMotionMask, KeymapStateMask, ExposureMask, VisibilityChangeMask, |
|
|
407 | StructureNotifyMask, ResizeRedirectMask, SubstructureNotifyMask, |
|
|
408 | SubstructureRedirectMask, FocusChangeMask, PropertyChangeMask, |
|
|
409 | ColormapChangeMask, OwnerGrabButtonMask |
|
|
410 | urxvt::KeyPress, KeyRelease, ButtonPress, ButtonRelease, MotionNotify, |
|
|
411 | EnterNotify, LeaveNotify, FocusIn, FocusOut, KeymapNotify, Expose, |
|
|
412 | GraphicsExpose, NoExpose, VisibilityNotify, CreateNotify, DestroyNotify, |
|
|
413 | UnmapNotify, MapNotify, MapRequest, ReparentNotify, ConfigureNotify, |
|
|
414 | ConfigureRequest, GravityNotify, ResizeRequest, CirculateNotify, |
|
|
415 | CirculateRequest, PropertyNotify, SelectionClear, SelectionRequest, |
|
|
416 | SelectionNotify, ColormapNotify, ClientMessage, MappingNotify |
387 | Various constants for use in X calls and event processing. |
417 | Various constants for use in X calls and event processing. |
388 | |
418 | |
389 | RENDITION |
419 | RENDITION |
390 | Rendition bitsets contain information about colour, font, font styles |
420 | Rendition bitsets contain information about colour, font, font styles |
391 | and similar information for each screen cell. |
421 | and similar information for each screen cell. |
… | |
… | |
639 | Return the window id of the toplevel window. |
669 | Return the window id of the toplevel window. |
640 | |
670 | |
641 | $windowid = $term->vt |
671 | $windowid = $term->vt |
642 | Return the window id of the terminal window. |
672 | Return the window id of the terminal window. |
643 | |
673 | |
|
|
674 | $term->vt_emask_add ($x_event_mask) |
|
|
675 | Adds the specified events to the vt event mask. Useful e.g. when you |
|
|
676 | want to receive pointer events all the times: |
|
|
677 | |
|
|
678 | $term->vt_emask_add (urxvt::PointerMotionMask); |
|
|
679 | |
644 | $window_width = $term->width |
680 | $window_width = $term->width |
645 | $window_height = $term->height |
681 | $window_height = $term->height |
646 | $font_width = $term->fwidth |
682 | $font_width = $term->fwidth |
647 | $font_height = $term->fheight |
683 | $font_height = $term->fheight |
648 | $font_ascent = $term->fbase |
684 | $font_ascent = $term->fbase |
… | |
… | |
650 | $terminal_columns = $term->ncol |
686 | $terminal_columns = $term->ncol |
651 | $has_focus = $term->focus |
687 | $has_focus = $term->focus |
652 | $is_mapped = $term->mapped |
688 | $is_mapped = $term->mapped |
653 | $max_scrollback = $term->saveLines |
689 | $max_scrollback = $term->saveLines |
654 | $nrow_plus_saveLines = $term->total_rows |
690 | $nrow_plus_saveLines = $term->total_rows |
655 | $lines_in_scrollback = $term->nsaved |
691 | $topmost_scrollback_row = $term->top_row |
656 | Return various integers describing terminal characteristics. |
692 | Return various integers describing terminal characteristics. |
657 | |
693 | |
658 | $x_display = $term->display_id |
694 | $x_display = $term->display_id |
659 | Return the DISPLAY used by rxvt-unicode. |
695 | Return the DISPLAY used by rxvt-unicode. |
660 | |
696 | |
… | |
… | |
671 | Return the modifier masks corresponding to the "ISO Level 3 Shift" |
707 | Return the modifier masks corresponding to the "ISO Level 3 Shift" |
672 | (often AltGr), the meta key (often Alt) and the num lock key, if |
708 | (often AltGr), the meta key (often Alt) and the num lock key, if |
673 | applicable. |
709 | applicable. |
674 | |
710 | |
675 | $view_start = $term->view_start ([$newvalue]) |
711 | $view_start = $term->view_start ([$newvalue]) |
676 | Returns the negative row number of the topmost line. Minimum value |
712 | Returns the row number of the topmost displayed line. Maximum value |
677 | is 0, which displays the normal terminal contents. Larger values |
713 | is 0, which displays the normal terminal contents. Lower values |
678 | scroll this many lines into the scrollback buffer. |
714 | scroll this many lines into the scrollback buffer. |
679 | |
715 | |
680 | $term->want_refresh |
716 | $term->want_refresh |
681 | Requests a screen refresh. At the next opportunity, rxvt-unicode |
717 | Requests a screen refresh. At the next opportunity, rxvt-unicode |
682 | will compare the on-screen display with its stored representation. |
718 | will compare the on-screen display with its stored representation. |